You can do that from any structure see this preferably your module’s layout report, Magento did it into their theme’s layout page called page. Xml located throughout app/design/frontend/base/default/layout/page. Xml.
Let’s look at this example of affirmation in Magento. I also took a while to extract many validation rules you need to use, and their error message. You can obtain the SugarCRM UK methods yourself simply by looking in js/prototype/validation. Js on brand 414
Hope this clears some things up for you. At the very least, you now have a list of all validation classes in Magento.
So, be sure to check your validation principle. For our functions, we’ll override magento programmers validate-email method. We want it acknowledge only email details ending with @gmail.com.
Magento employs Prototype library to handle form validation. This comes inside handy, because all you should do when writing custom form is to assign a appropriate class names for a input fields, and pass the form id to VarienForm object.