Magento Validate Form Only Certain Fields
11,032
To validate only a certain field, you can use:
Validation.validate(document.getElementById(id));
Author by
Jeaf Gilbert
Full-stack Developer (PHP, HTML, CSS, Javascript, MySQL)
Updated on June 09, 2022Comments
-
Jeaf Gilbert about 2 years
I have a function to validate all fields in a form:
validateForm: function() { var validator = new Validation(this.form); validator.validate(); }
There are two controls. First control need to validate only a,b,c fields. Second control need to validate only d,e,f fields. How can I achieve this?
-
Xiaokun almost 8 yearswhat is
Validation
? -
Shadoweb over 6 years@Xiaokun Validation is the prototype class you will find in js/prototype/validation.js