Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

Custom validation rules

Custom validation rules

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:

  1. 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.
  2. 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.

Feedback