As shown earlier, the validation array will have this prototype: In order to organize your rules into “sets” requires that you place them into “sub arrays”.
Magento uses Prototype library to manage form validation.
Any native PHP function that accepts one parameter can be used as a rule, like ``htmlspecialchars()``, ``trim()``, etc. It’s time to repopulate the form field with the submitted data.
Code Igniter offers several helper functions that permit you to do this.
We’ve arbitrarily called these two rules “signup” and “email”.
You can name your rules anything you want: An alternate (and more automatic) method of calling a rule group is to name it according to the controller class/method you intend to use it with.