Commit 17339e36 authored by webchick's avatar webchick

Issue #2084681 by Xano: Fixed 'must be higher or equal to...'.

parent 5e2fac49
......@@ -4379,12 +4379,12 @@ function form_validate_number(&$element, &$form_state) {
// Ensure that the input is greater than the #min property, if set.
if (isset($element['#min']) && $value < $element['#min']) {
form_error($element, t('%name must be higher or equal to %min.', array('%name' => $name, '%min' => $element['#min'])));
form_error($element, t('%name must be higher than or equal to %min.', array('%name' => $name, '%min' => $element['#min'])));
}
// Ensure that the input is less than the #max property, if set.
if (isset($element['#max']) && $value > $element['#max']) {
form_error($element, t('%name must be below or equal to %max.', array('%name' => $name, '%max' => $element['#max'])));
form_error($element, t('%name must be lower than or equal to %max.', array('%name' => $name, '%max' => $element['#max'])));
}
if (isset($element['#step']) && strtolower($element['#step']) != 'any') {
......
......@@ -374,8 +374,8 @@ function testNumber() {
// Array with all the error messages to be checked.
$error_messages = array(
'no_number' => '%name must be a number.',
'too_low' => '%name must be higher or equal to %min.',
'too_high' => '%name must be below or equal to %max.',
'too_low' => '%name must be higher than or equal to %min.',
'too_high' => '%name must be lower than or equal to %max.',
'step_mismatch' => '%name is not a valid number.',
);
......
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