RSform!Pro allows to add custom validation rules for the components that allow validation rules.
In order to add a new validation rule, navigate in your Joomla file list, go to components/com_rsform/helpers/validation.php. In this file you will find all the validation rules defined. In order to add a new validation rule, edit the file validation.php in the following manner:
- Add a new function that allows only one parameter. The name of the function will be the name of the validation rule, as displayed when adding a new component.
- On success, the function should return true. On fail, the function should return false.
Example:
function validA($param,$extra = null)
{
if($param !== 'a')
return false;
return true;
}
The above example will only validate the char "a".
Caution: do not delete any validation rules unless you know what you are doing. In you still wish to delete one validation rule, check to see that the validation rule is not used anywhere inside your forms.





