Issue #2084681 by Xano: Fixed 'must be higher or equal to...'.
parent
5e2fac496d
commit
17339e36c6
|
@ -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 @@ class FormTest extends WebTestBase {
|
|||
// 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.',
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue