'range' is for numeric values, not strings like your display name.
use array('between', 5, 15)

On Feb 26, 8:00 am, kaushik <[email protected]> wrote:
> I am using Automagic JavaScript Validation. for password i am using
> this code:
>
> 'password' => array(
>                 'required' => array('rule' => array('minLength', 7),
> 'message'=>'Minimum Length of Password is 7'),
>         )
>
> It is working perfectly. but for another field I want to maintain the
> length between 5 and 10. I am using 'range' for this porpose like
> that:
>
> 'displayName' => array(
>                 'required' => array('rule' => array('range', 1,10),
> 'message'=>'Please enter a display name'),
>         )
>
> But it is not working. Can anyone tell me, how to mention the limit
> for range.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to