Hi,
I have successfully implemented the javascript automagic
validation using the plugins. It converts the validation rules written
in the model class in to the js code. so we can write the validation
rules for every table field which is used by a model class.
Now the question is that , suppose i have change password
form.
echo $form->create('User', array('action' => 'password'));
$form->password('adminpwd', array('class' =>
'inputstyle','maxlength' => '15')) // old password
$form->password('adminnassword', array('class' =>
'inputstyle','maxlength' => '15')) // new password
$form->password('admincpassword', array('class' =>
'inputstyle','maxlength' => '15')) // confirm password
$form->button(' Change Password ',
array('type'=>'submit', 'class' => 'bigbluebutton'))
echo $form->end();
'adminpwd' is a TABLE field and i write the validation rules in
the model class:
class User extends AppModel {
var $validate = array('adminpwd' => array(
'rule' => 'notEmpty',
'message' => 'Password
can not be left blank'
)
);
}
I NEED TO WRITE THE VALIDATION RULES FOR THE 'adminnassword'
AND 'admincpassword' WHICH IS NOT THE FILED FOR THE TABLE.
I DONT WANT TO MAKE THESE TWO INPUTS VALIDATION IN THE
CONTROLLER manually. I WANT TO WRITE IT IN THE MODEL CLASS. SO THAT I
CAN USE THE RULES WHEN I use validates() OR WHEN I USE JAVASCRIPT
AUTOMAGIC VALIDATION.
IF IT POSSIBLE THEN I JUST NEED TO WRITE THE RULES .
Please can any one give me suggession? HOW TO WRITE RULES FOR
THIS TWO NON DATABASE FILED???
I use cake 1.3.0
Thanks
On May 17, 11:33 am, Nandan Jana <[email protected]> wrote:
> Hi,
> I have fixed it. and properly installed the plugins. and i am
> trying to use it for some simple form validation..
>
> thanks for the help......
>
> On May 17, 10:20 am, Nandan Jana <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I study the linkhttp://github.com/mcurry/js_validate
>
> > and try to use this plugin and got this error
>
> > Warning (512): Method ValidationHelper::rules does not exist [CORE/
> > cake/libs/view/helper.php, line 161]
>
> > i am using cake 1.3.0 version...
>
> > Thanks
>
> > On May 17, 9:49 am, Walther <[email protected]> wrote:
>
> > > Who are you, and why are you talking about facets?
>
> > > On May 16, 2:51 pm, floridapastor <[email protected]> wrote:
>
> > > > I am aware and talking about the FACETS. You should check it out on
> > > > google
> > > > and please reply. pastor
>
> > > > On Sun, May 16, 2010 at 3:05 AM, Walther <[email protected]> wrote:
> > > > > You know, there is this wonderful little tool available called 'Google
> > > > > Search' use it.
>
> > > > >http://tinyurl.com/33mcrqb
>
> > > > >http://github.com/mcurry/js_validate
> > > > >http://sandbox2.pseudocoder.com/demo/validation
>
> > > > > On May 15, 9:24 am, Nandan Jana <[email protected]> wrote:
> > > > > > Please can any one reply.
>
> > > > > > is it possible to validate a form by javascript in cake 1.3.0 . i
> > > > > > have
> > > > > > used validation rules in model, but want a client side checking???
>
> > > > > > On May 14, 4:47 pm, Nandan Jana <[email protected]> wrote:
>
> > > > > > > Hi,
>
> > > > > > > I am a php developer and i never use a frame work. Nowaday's
> > > > > > > frame work is must . so i search a lot in google and decided to
> > > > > > > use
> > > > > > > CAKEPHP.
>
> > > > > > > I am using the latest stable version 1.3.0 , Try to
> > > > > > > develope a
> > > > > > > admin panel first and i have learned a lot about model,
> > > > > > > controller,
> > > > > > > layout, elements . I have developed a login panel , session
> > > > > > > management, template partition using elements . and now working
> > > > > > > for
> > > > > > > to complete a full control panel.
>
> > > > > > > i have used validation rules in the model class and the form
> > > > > > > is
> > > > > > > validated by server side.BUT
>
> > > > > > > Check out the new CakePHP Questions
> > > > > > > sitehttp://cakeqs.organdhelpothers
> > > > > with their CakePHP related questions.
>
> > > > > > > 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]<cake-php%[email protected]
> > > > > > > om>For more options, visit this group athttp://
> > > > > groups.google.com/group/cake-php?hl=en
>
> > > > > > Check out the new CakePHP Questions
> > > > > > sitehttp://cakeqs.organdhelpothers
> > > > > with their CakePHP related questions.
>
> > > > > > 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]<cake-php%[email protected]
> > > > > > om>For more options, visit this group athttp://
> > > > > groups.google.com/group/cake-php?hl=en
>
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers
> > > > > with their CakePHP related questions.
>
> > > > > 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]<cake-php%[email protected]
> > > > > om>For more options, visit this group at
> > > > >http://groups.google.com/group/cake-php?hl=en
>
> > > > Check out the new CakePHP Questions
> > > > sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
>
> > > > 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 athttp://groups.google.com/group/cake-php?hl=en
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers
> > > with their CakePHP related questions.
>
> > > 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
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> > with their CakePHP related questions.
>
> > 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
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with
> their CakePHP related questions.
>
> 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
> athttp://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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