function fapi_validation_fapi_validation_rules in Form API Validation 7.2
Same name and namespace in other branches
- 6 fapi_validation.module \fapi_validation_fapi_validation_rules()
- 7 fapi_validation.module \fapi_validation_fapi_validation_rules()
Implementation of hook_fapi_validation_rules
File
- ./
fapi_validation.module, line 168
Code
function fapi_validation_fapi_validation_rules() {
return array(
'numeric' => array(
'callback' => 'fapi_validation_rule_numeric',
'error_msg' => t('Use only numbers at %field.'),
),
'alpha' => array(
'callback' => 'fapi_validation_rule_alpha',
'error_msg' => t('Use only alpha characters at %field.'),
),
'alpha_numeric' => array(
'callback' => 'fapi_validation_rule_alpha_numeric',
'error_msg' => t('Use only alpha numerics characters at %field.'),
),
'email' => array(
'callback' => 'fapi_validation_rule_email',
'error_msg' => t('%field is not a valid email.'),
),
'length' => array(
'callback' => 'fapi_validation_rule_length',
'error_msg' => t('Invalid size of %field value.'),
),
'chars' => array(
'callback' => 'fapi_validation_rule_chars',
'error_msg' => t('Invalid characters on %field value.'),
),
'url' => array(
'callback' => 'fapi_validation_rule_url',
'error_msg' => t('Invalid format of %field.'),
),
'ipv4' => array(
'callback' => 'fapi_validation_rule_ipv4',
'error_msg' => t('Invalid format of %field.'),
),
'alpha_dash' => array(
'callback' => 'fapi_validation_rule_alpha_dash',
'error_msg' => t('Use only alpha numerics, hyphen and underscore at %field.'),
),
'digit' => array(
'callback' => 'fapi_validation_rule_digit',
'error_msg' => t('Use only digits on %field.'),
),
'decimal' => array(
'callback' => 'fapi_validation_rule_decimal',
'error_msg' => t('Use only decimal on %field.'),
),
'regexp' => array(
'callback' => 'fapi_validation_rule_regexp',
'error_msg' => t('%field value does not match rule.'),
),
'match_field' => array(
'callback' => 'fapi_validation_rule_match_field',
'error_msg' => t('%field value does not match other field.'),
),
'range' => array(
'callback' => 'fapi_validation_rule_range',
'error_msg' => t('%field value is out of range.'),
),
'limit_decimals' => array(
'callback' => 'fapi_validation_rule_limit_decimals',
'error_msg' => t('Invalid value for %field or too many decimal digits'),
),
);
}