I hope this may work,

this worked for me

http://webnans.blogspot.com
Thanks

Pradhap

On Saturday, March 27, 2010 12:35:58 AM UTC+5:30, aapljack wrote:
>
> I am building a form with a set of radio buttons and am failing to get
> any kind of error message when they don't pass the validation.
>
> Here is the model code I have for validation..
>
> var $validate = array(
>                 'name' => array(
>                         'rule' => 'notEmpty',
>                                 'message' => 'Name is required'
>                 ),
>                 'email' => array(
>                         'rule' => 'email',
>                         'message' => 'A valid email address is required'
>                 ),
>                         'services' => array(
>                                 'rule' => 'notEmpty',
>                                 'allowEmpty' => false,
>                                 'message' => 'Select a service'
>                         )
>             );
>
> The 'Services' are the radio buttons I am validating.
>
> Here is the code for the view for the 'Services' radio buttons. These
> were taken from an example and not changed. Trying to get them to work
> first..
>
>   $options = array('M'=>'Male','F'=>'Female');
>   $attributes = array('legend'=>true);
>   echo $form->radio('Contest.services',$options,$attributes);
>
> The form seems to be validating the radio buttons, but it will not
> give me an error message on the page.
>
> Any ideas?
>
> Thanks!
>
> Brian
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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

Reply via email to