| 
| Size: | 12263 | 
| Storage flags: | no_autoload,compress/gzip (26%) | 
Zend\Validator\Step allows you to validate if a given value is a valid step value. This validator requires the value to be a numeric value (either string, int or float).
The following options are supported for Zend\Validator\Step:
A basic example is the following one:
1 2 3 4 5 6 7  | $validator = new Zend\Validator\Step();
if ($validator->isValid(1)) {
    // value is a valid step value
} else {
    // false
}
 | 
This validator also supports floating-point base value and step value. Here is a basic example of this feature:
1 2 3 4 5 6 7 8 9 10 11  | $validator = new Zend\Validator\Step(
    array(
        'baseValue' => 1.1,
        'step'      => 2.2,
    )
);
echo $validator->isValid(1.1); // prints true
echo $validator->isValid(3.3); // prints true
echo $validator->isValid(3.35); // prints false
echo $validator->isValid(2.2); // prints false
 | 
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.