On click of the Next/Submit button, a function named entityFormClientValidate is executed. You can extend this method to add custom validation logic.
if (window.jQuery) {
(function ($) {
if (typeof (entityFormClientValidate) != ‘undefined’) {
var originalValidationFunction = entityFormClientValidate;
if (originalValidationFunction && typeof (originalValidationFunction) == “function”) {
entityFormClientValidate = function() {
originalValidationFunction.apply(this, arguments);
// do your custom validation here
// return false; // to prevent the form submit you need to return false
// end custom validation.
return true;
};
}
}
}(window.jQuery));
}