LessThan
Zend_Validate_LessThan allows you to validate if a given value is
less than a maximum border value. It is the cousine of
Zend_Validate_GreaterThan.
Zend_Validate_LessThan supports only number validation
It should be noted that Zend_Validate_LessThan supports only the
validation of numbers. Strings or dates can not be validated with this validator.
Supported options for Zend_Validate_LessThan
The following options are supported for Zend_Validate_LessThan:
max: Sets the maximum allowed value.
Basic usage
To validate if a given value is less than a defined border simply use the following
example.
10));
$value = 10;
$return = $valid->isValid($value);
// returns true
]]>
The above example returns TRUE for all values which are equal to 10
or lower than 10.