Magento: How to override prototype form validations.


Step 1:
if(Validation) {  
Validation.addAllThese([
[
'custom-form-validation-zip-class',
'Please enter the vaild zip code.',
function(v)
{
if (!(/^[0-9-]+$/.test(v))) {
return false;
}
return true;
}
],
   [ ]
])
}

Step  2:
<input type="text" name="zip" id="zip "class="input-text required-entry  custom-form-validation-zip-class " />

Note: You will know more about Magento & Download latest version of Magento from http://www.magentocommerce.com/
Magento: How to override prototype form validations. Magento: How to override prototype form validations. Reviewed by Web Technology Funda on 11:38:00 PM Rating: 5

No comments

Free! Free!Free! Subscribe to Get Free PHP (Magento) tutorial Update in Your Inbox!!! Hurry Up!!!