Re: jquery validation helper not working in 2.2.4
Hi, That's a helper I created a while back and it will work on 2.2.4, although you might want to get the latest version from GitHub https://github.com/vz28bh/CakePHP-JqueryValidationHelper In that version I recommend opening the form like below, just to make things a little cleaner. ?php echo $this-JqueryValidation-createHorizontal('User'); ? Also, make sure you include Jquery itself echo $this-Html-script('jquery.min'); and have defined some validation criteria in your models 'username' = array( 'notempty' = array( 'rule' = array('notempty'), //'message' = 'Your custom message here', //'allowEmpty' = false, //'required' = false, ), ), If you can get Firefox with Firebug installed you can see if there are any Javascript problems. I assume server side means you only get validation after clicking submit, which would be using the Cake model validation instead of Javascript. Matt -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: jquery validation helper not working in 2.2.4
On Tue, Jan 8, 2013 at 3:18 PM, vanessa v vi11anu.vane...@gmail.com wrote: I'm trying to use the jquery validation helper in my registration form but looks like it is still validating server-side. You haven't said what the problem is. And what do you mean by it is still validating server-side? The helper itself is server-side code, whereas the actual JqueryValidation code runs on the client. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
jquery validation helper not working in 2.2.4
I'm trying to use the jquery validation helper in my registration form but looks like it is still validating server-side. I have the following code added in my default.ctp echo $this-Html-script('jquery.validate.min'); echo $this-Html-script('additional-methods.js'); echo $this-Html-script('jquery.metadata'); UsersController.php has the Helper set up public $helpers = array('Html', 'Session','Form', 'Js' = array('Jquery'), 'JqueryValidation'); add.ctp has the validation implemented: ?php echo $this-Form-create('User', array('class' = 'jquery-validation')); ? fieldset legend /legend ?php //echo $this-Form-input('username'); echo $this-JqueryValidation-input('username'); echo $this-JqueryValidation-input('first_name'); echo $this-JqueryValidation-input('last_name'); echo $this-JqueryValidation-input('password'); echo $this-Form-input('role', array( 'options' = array('admin' = 'Admin', 'author' = 'Author') )); Does the jquery validation helper (http://bakery.cakephp.org/articles/matt_1/2012/10/11/jquery_validation_helper) work with cakephp 2.2.4? Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.