bit0123
(Kaushik Itdu)
1
I wanna check a input field with the bellow given criteria:
-
Only accept integer value
-
length minimum 1 maximum 3
-
value minimum 5
array('roll', 'numerical', 'integerOnly'=>true),
array('roll', 'length', 'min'=>1, 'max'=>3),
The above mentioned code satisfy first 2 criteria.
How to satisfy 3rd criteria.
Please Help.
Thanks in advance
kokomo
(Mwerlberger85)
2
You forgot the min in the first rule.
For CNumberValidator (first rule) means min the lower limit of the number.
For CStringValidator (second rule) means min the minimum length.
array('roll', 'numerical', 'integerOnly'=>true, 'min'=>5),
array('roll', 'length', 'min'=>1, 'max'=>3),
1 Like
Is there a max CNumberValidator ?
tri
(tri - Tommy Riboe)
5