You need to patch / rewrite / render monkeys harmless (depending on which term suits you best) $.fn.rules , which uses the validate plugin when creating rules to run for a field, in order to put its rule in second place in the rules object , after the required rule.
If you are looking for rules in a script, you need to add similar logic to it before if (data.required)
If (data.yourRuleName) { var param = data.yourRuleName; delete data.yourRuleName; data = $.extend({ yourRuleName: param }, data); }
Or you can copy the rules section, add above and put it in the script that is referenced after checking the script. That way, if the script changes, you donβt have to apply these changes to the new version of the script (assuming the rules work the same anyway).
source share