Commit 14f8a4b7 authored by haggins's avatar haggins Committed by Jelle
Browse files

Issue #2036661 by haggins: Fixed Validation on #rules too eager.

parent 9fe03f52
......@@ -80,12 +80,12 @@ function _clientside_validation_set_fapi_validation($element, $rule, $params, &$
$title = $element['#title'];
}
$expressions = array(
'fapi_validation_rule_alpha' => '/^[\p{L}]+$/uD',
'fapi_validation_rule_alpha_numeric' => '/^[\p{L}\p{N}]+$/uD',
'fapi_validation_rule_alpha' => '/^[\p{L}]*$/uD',
'fapi_validation_rule_alpha_numeric' => '/^[\p{L}\p{N}]*$/uD',
'fapi_validation_rule_ipv4' => '/^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
. '(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$/',
'fapi_validation_rule_alpha_dash' => '/^[-\p{L}\p{N}_]+$/uD',
'fapi_validation_rule_digit' => '/^\d+$/',
'fapi_validation_rule_alpha_dash' => '/^[-\p{L}\p{N}_]*$/uD',
'fapi_validation_rule_digit' => '/^\d*$/',
);
if (strpos($message, '%field') !== FALSE) {
$message = t($message, array('%field' => _clientside_validation_set_title($title)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment