Thank you @Pulkit_Jain_
I have followed the documentation and created custom functions for validation. The challenge is, the rule editor/validation service is not respecting what my function is returning. For example, this custom validate function:
function validate() {
return somePromise().then(function (promiseResponse) {
return $.ajax({
url: '/service/url',
method: "POST",
data: "data=" + promiseResponse
}).then(function (response) {
return response.success
}).catch(function () {
return false;
});
});
}
The form validation is not respecting the function's return, when the function returns false, the form still says it is valid. The function does run, but I've noticed that the validation feedback is presented to the user before the function/request has occurred/completed.