mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 00:32:16 +02:00
Use "{less/greater} than or equal to" phrasing
This commit is contained in:
parent
a0cc815add
commit
08a5ab0d81
|
@ -17,12 +17,12 @@ class MaxException extends ValidationException
|
|||
|
||||
public static $defaultTemplates = [
|
||||
self::MODE_DEFAULT => [
|
||||
self::STANDARD => '{{name}} must be lower than {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must be lower than or equals {{interval}}',
|
||||
self::STANDARD => '{{name}} must be less than {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must be less than or equal to {{interval}}',
|
||||
],
|
||||
self::MODE_NEGATIVE => [
|
||||
self::STANDARD => '{{name}} must not be lower than {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must not be lower than or equals {{interval}}',
|
||||
self::STANDARD => '{{name}} must not be less than {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must not be less than or equal to {{interval}}',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@ class MinException extends ValidationException
|
|||
public static $defaultTemplates = [
|
||||
self::MODE_DEFAULT => [
|
||||
self::STANDARD => '{{name}} must be greater than {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must be greater than or equals {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must be greater than or equal to {{interval}}',
|
||||
],
|
||||
self::MODE_NEGATIVE => [
|
||||
self::STANDARD => '{{name}} must not be greater than {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must not be greater than or equals {{interval}}',
|
||||
self::INCLUSIVE => '{{name}} must not be greater than or equal to {{interval}}',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -11,4 +11,4 @@ try {
|
|||
echo $e->getMainMessage().PHP_EOL;
|
||||
}
|
||||
--EXPECTF--
|
||||
42 must be lower than or equals 2
|
||||
42 must be less than or equal to 2
|
||||
|
|
|
@ -11,4 +11,4 @@ try {
|
|||
echo $e->getMainMessage().PHP_EOL;
|
||||
}
|
||||
--EXPECTF--
|
||||
-42 must be greater than or equals 1
|
||||
-42 must be greater than or equal to 1
|
||||
|
|
|
@ -11,4 +11,4 @@ try {
|
|||
echo $e->getFullMessage();
|
||||
}
|
||||
--EXPECTF--
|
||||
- "c" must be lower than or equals "b"
|
||||
- "c" must be less than or equal to "b"
|
||||
|
|
|
@ -11,4 +11,4 @@ try {
|
|||
echo $e->getFullMessage();
|
||||
}
|
||||
--EXPECTF--
|
||||
- "a" must not be lower than or equals "b"
|
||||
- "a" must not be less than or equal to "b"
|
||||
|
|
|
@ -11,4 +11,4 @@ try {
|
|||
echo $e->getFullMessage();
|
||||
}
|
||||
--EXPECTF--
|
||||
- 41 must not be lower than or equals 42
|
||||
- 41 must not be less than or equal to 42
|
||||
|
|
|
@ -15,4 +15,4 @@ try {
|
|||
?>
|
||||
--EXPECTF--
|
||||
- "something" is not tasty
|
||||
- "something" must be greater than or equals 1
|
||||
- "something" must be greater than or equal to 1
|
||||
|
|
Loading…
Reference in a new issue