Validate Input Fields Using Data Attributes | jQuery validate.js


jquery validation is a simple and lightweight form validation plugin that works with the most used input fields such as username, email, number, password, and more. Attributes: data-require=”true” (Also works in checkbox) data-error=”Please enter mobile number” data-number='{“msg”:”Please enter valid number”}’ data-long='{“len”:”10″,”msg”:”Number should be 10 charators long”}’ data-display=”mobile_error” data-min='{“len”:”6″,”msg”:”Minimun 6 chars long”}’ data-max='{“len”:”20″,”msg”:”Maximum 6 chars long”}’ … Read more