Title: validate form equals 2 fields Post by: crosemffet on August 28, 2018, 11:23:44 AM hello and thanks in advance for your support.
I've seen the extension: // extend the 'equals' rule $.extend($.fn.validatebox.defaults.rules, { equals: { validator: function(value,param){ return value == $(param[0]).val(); }, message: 'Field do not match.' } }); used to validate field a equals to field B. I need to make some change, I need to check if one specific field is equal to field B or field C, any of them return true. example, lets pretend field fruits and need to validate with orange and apple. both orange an apple are input types hidden. any idea? regards, Title: Re: validate form equals 2 fields Post by: jarry on August 28, 2018, 11:15:18 PM Here is the code example:
Code: <script type="text/javascript"> |