I tried this still not working..If I use scaffolding to test
everything works fine validation errors shows up.
When I use my view then the problem arises.

On Jan 8, 2:29 pm, Nature Lover <[email protected]> wrote:
> Hi!
>
> try by mentioning also the model name while outputting errors, so the
> view code will become:
>
> <?echo $form->create('user', array('action' => 'signup'));?>
> <fieldset>
>          <legend>Signup</legend>
>      <?php
>                  echo $form->input('User.users_name',array
> ("label"=>"Name:"));
>                  echo $form->error('User.users_name');
>
>                  echo $form->input('User.users_email',array
> ("label"=>"Email:"));
>                 echo $form->error('User.users_email');
>
>                  echo $form->input('User.users_password',array
>  ("label"=>"Password:","type"=>"password"));
>                  echo $form->input('User.password_confirm',array
> ('label'=>'Password
>  Confirm:','type'=>'password'));
>                  echo $form->error('User.users_password');
>                  echo $form->error('User.password_confirm');
>          ?>
> </fieldset>
> <?echo $form->end("Sign Up");?>
>
> Thanks!
>
> On Jan 8, 10:34 am,josnidhin<[email protected]> wrote:
>
> > <?echo $form->create('user', array('action' => 'signup'));?>
> > <fieldset>
> >         <legend>Signup</legend>
> >     <?php
> >                 echo $form->input('users_name',array("label"=>"Name:"));
> >                 echo $form->error('users_name');
>
> >                 echo $form->input('users_email',array("label"=>"Email:"));
> >                 echo $form->error('users_email');
>
> >                 echo $form->input('users_password',array
> > ("label"=>"Password:","type"=>"password"));
> >                 echo 
> > $form->input('password_confirm',array('label'=>'Password
> > Confirm:','type'=>'password'));
> >                 echo $form->error('users_password');
> >                 echo $form->error('password_confirm');
> >         ?>
> > </fieldset>
> > <?echo $form->end("Sign Up");?>
>
> > This is how my view looks like. I am still not getting the errors. But
> > my validation is working as it only inserts into the database when the
> > data is correct.
>
> > var $validate = array(
> >         "users_name" => array("rule" => "alphaNumeric","required" =>
> > true,"allowEmpty"=>false,"message" => "Alphabets and numbers only"),
> >         "users_email" => array(
> >                 "email"=>array("rule"=>"email","message"=>"Invalid email
> > address","required" => true,"allowEmpty"=>false),
> >                 "unique"=>array("rule"=>array
> > ("validateUniqueEmail"),"message"=>"This Email is already in
> > use","required" => true,"allowEmpty"=>false)),
> >         "users_password" => array("rule" => array
> > ("confirmPassword","password"),"required"=>true,"allowEmpty"=>false,"message"
> > => "Password do not match"),
> >                 "password_confirm" => array("rule" => 
> > "alphaNumeric","required" =>
> > true)
> > );
>
> > This is how my validate array in model looks like confirmPassword and
> > validateUniqueEmail are function that I wrote. I am not able to figure
> > out why this is happening.
--~--~---------~--~----~------------~-------~--~----~
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