victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

Validate two inputs at time #661

Open php-ini opened 6 years ago

php-ini commented 6 years ago

I have input1 & input2 .. how can I validate that the sum of their characters length are not exceed 30 (for example) ?

like:

var one = input1.val() = 10;
var two = input2.val() = 25;

if ((one + two) >= 30) trigger validation error else valid

how can this be implemented ?