http://groups.google.com/group/cake-php/browse_thread/thread/610bc62336c1cb4b/2724fab26d98b9af?lnk=gst&q=validation+between#2724fab26d98b9af

working on a solution :)

phpjoy wrote:
> Hey all,
>
> I'm having some (probably stupid) validation error. The 'address'
> field always invalidates, regardless of the number of chars.
> I ought to add that it happens *only* on "update" (edit), the adding
> works perfectly!
>
>       var $validate = array(
>               'firstname' => array('rule' => array('between', 2, 
> 20),'message' =>
> 'יש להזין לפחות 2 תווים'),
>               'lastname' => array('rule' => array('between', 2, 20),'message' 
> =>
> 'יש להזין לפחות 2 תווים'),
>               'ssc' => array(
>                       'number' => array('rule' => array('numeric'),'message' 
> => 'יש להזין
> תעודת זהות תקינה'),
>                       'between'=> array('rule' => array('between', 5, 
> 12),'message' =>
> 'יש להזין תעודת זהות תקינה')),
>               'address' => array('rule' => array('between', 4, 20),'message' 
> =>
> 'יש להזין לפחות 4 תווים'),
>               'city' => array('rule' => array('between', 2, 20),'message' => 
> 'יש
> להזין לפחות 2 תווים'),
>               'zipcode' => array('rule' => array('numeric'),'allowEmpty' =>
> true,'message' => 'יש להזין מספרים בלבד'),
>               'pobox' => array('rule' => array('numeric'),'allowEmpty' =>
> true,'message' => 'יש להזין מספרים בלבד'),
>               'homephone_num' => array('rule' => array('between', 9, 
> 20),'message'
> => 'יש להזין מספר טלפון עם קידומת'),
>               'cellphone_num' => array('rule' => array('between', 10,
> 20),'message' => 'יש להזין לפחות 10 תווים')
>       );
>
> I might have messed up the validation somewhere.
>
> edit_profile.ctp has this line in it:
>
>           <?php echo $form->input('UserStaticProfile.address',
> array('maxlength'=>20, 'class' => 'inputbox', 'label' => 'כתובת'));?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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