Definition at line 33 of file Between.php.
◆ __construct()
Sets validator options Accepts the following option keys: 'min' => scalar, minimum border 'max' => scalar, maximum border 'inclusive' => boolean, inclusive border values
- Parameters
-
- Exceptions
-
Definition at line 99 of file Between.php.
105 $temp[
'min'] = array_shift(
$options);
107 $temp[
'max'] = array_shift(
$options);
111 $temp[
'inclusive'] = array_shift(
$options);
117 if (!array_key_exists(
'min',
$options) || !array_key_exists(
'max',
$options)) {
118 #require_once 'Zend/Validate/Exception.php'; 122 if (!array_key_exists(
'inclusive',
$options)) {
128 ->setInclusive(
$options[
'inclusive']);
◆ getInclusive()
Returns the inclusive option
- Returns
- boolean
Definition at line 180 of file Between.php.
◆ getMax()
Returns the max option
- Returns
- mixed
Definition at line 158 of file Between.php.
◆ getMin()
Returns the min option
- Returns
- mixed
Definition at line 136 of file Between.php.
◆ isValid()
Defined by Zend_Validate_Interface
Returns true if and only if $value is between min and max options, inclusively if inclusive option is true.
- Parameters
-
- Returns
- boolean
Implements Zend_Validate_Interface.
Definition at line 206 of file Between.php.
210 if ($this->_inclusive) {
212 $this->
_error(self::NOT_BETWEEN);
217 $this->
_error(self::NOT_BETWEEN_STRICT);
_error($messageKey, $value=null)
◆ setInclusive()
setInclusive |
( |
|
$inclusive | ) |
|
◆ setMax()
◆ setMin()
◆ $_inclusive
◆ $_max
◆ $_messageTemplates
Initial value:= array(
self::NOT_BETWEEN => "'%value%' is not between '%min%' and '%max%', inclusively",
self::NOT_BETWEEN_STRICT => "'%value%' is not strictly between '%min%' and '%max%'"
)
Definition at line 50 of file Between.php.
◆ $_messageVariables
Initial value:= array(
'min' => '_min',
'max' => '_max'
)
Definition at line 60 of file Between.php.
◆ $_min
◆ NOT_BETWEEN
const NOT_BETWEEN = 'notBetween' |
Validation failure message key for when the value is not between the min and max, inclusively
Definition at line 38 of file Between.php.
◆ NOT_BETWEEN_STRICT
const NOT_BETWEEN_STRICT = 'notBetweenStrict' |
Validation failure message key for when the value is not strictly between the min and max
Definition at line 43 of file Between.php.
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Validate/Between.php