notEmpty rule is not responding.
I am using cake_1.2.2.8120 ,notEmpty rule is not responding. // model code: var $validate = array( 'name' = array( 'rule' = 'notEmpty', 'required' = true, 'message'='Name field can not be empty.' ) ); //view code ?php /** * Class and Function List: * Function list: * Classes list: */ echo $form-create(array( 'enctype' = 'multipart/form-data' )); ? table tr tdOrganization Name*/td td?php echo $form-input('name', array( 'label' ='' )); ? ...and so no Please help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: notEmpty rule is not responding.
Please apply this code for your problem slove. var $validate = array( 'name' = array( 'rule' = VALID_NOT_EMPTY, 'allowEmpty' =false, 'required' = true, 'message'='Name field can not be empty.' ) ); On Wed, May 13, 2009 at 3:53 PM, cbhan gotob...@gmail.com wrote: I am using cake_1.2.2.8120 ,notEmpty rule is not responding. // model code: var $validate = array( 'name' = array( 'rule' = 'notEmpty', 'required' = true, 'message'='Name field can not be empty.' ) ); //view code ?php /** * Class and Function List: * Function list: * Classes list: */ echo $form-create(array( 'enctype' = 'multipart/form-data' )); ? table tr tdOrganization Name*/td td?php echo $form-input('name', array( 'label' ='' )); ? ...and so no Please help! -- Regards, Mohammad Arif Hossen Junior Web Developer United Group International(UGIBD) Mobile: +88 01714355911 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: notEmpty rule is not responding.
Thanks arif ,but i think VALID_NOT_EMPTY,is deprecated in Cake12, i made use of it ealier but same result.. On May 13, 3:44 pm, arif hossen arifhossen2...@gmail.com wrote: Please apply this code for your problem slove. var $validate = array( 'name' = array( 'rule' = VALID_NOT_EMPTY, 'allowEmpty' =false, 'required' = true, 'message'='Name field can not be empty.' ) ); On Wed, May 13, 2009 at 3:53 PM, cbhan gotob...@gmail.com wrote: I am using cake_1.2.2.8120 ,notEmpty rule is not responding. // model code: var $validate = array( 'name' = array( 'rule' = 'notEmpty', 'required' = true, 'message'='Name field can not be empty.' ) ); //view code ?php /** * Class and Function List: * Function list: * Classes list: */ echo $form-create(array( 'enctype' = 'multipart/form-data' )); ? table tr tdOrganization Name*/td td?php echo $form-input('name', array( 'label' ='' )); ? ...and so no Please help! -- Regards, Mohammad Arif Hossen Junior Web Developer United Group International(UGIBD) Mobile: +88 01714355911 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: notEmpty rule is not responding.
You dont need require true if you are using notEmpty. Kinda conflicting dont you think? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: notEmpty rule is not responding.
@Miles J: No. They serve different cases. notEmpty is to have content in field and required is to have field itself. @cbhan: How is rule not responding exactly? Always false or always true? Output $this-data and check what are you trying to save/ validate. On May 14, 2:47 am, Miles J mileswjohn...@gmail.com wrote: You dont need require true if you are using notEmpty. Kinda conflicting dont you think? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---