Re: Core validation rules examples
On Oct 5, 1:37 pm, Jonathan wrote: > I think I*ll file a bug report - then we hopefully get the answers > from a core developer. Lighthouse came back to life, so this is now reported as ticket #2068 (http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2068- validation-treats-rule-name-as-regex-rule-when-using-cook-book- examples-syntax). Regards Jonathan -- 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
Re: Core validation rules examples
good luck the ticket system seems to be down for several hours now.. probably a server failure maybe tomorrow it will be online again On 5 Okt., 13:37, Jonathan wrote: > On Oct 5, 12:08 pm, euromark wrote: > > > either way notEmpty should work fine with the current 1.3 versions > > maybe you override the method somewhere? > > No, it's a general problem, that the core validation rules, doesn't > work as the examples in the cook book suggests. > > I think I*ll file a bug report - then we hopefully get the answers > from a core developer. > > Regards > > Jonathan -- 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
Re: Core validation rules examples
On Oct 5, 12:08 pm, euromark wrote: > either way notEmpty should work fine with the current 1.3 versions > maybe you override the method somewhere? No, it's a general problem, that the core validation rules, doesn't work as the examples in the cook book suggests. I think I*ll file a bug report - then we hopefully get the answers from a core developer. Regards Jonathan -- 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
Re: Core validation rules examples
your version might work non the less but it is still better to use the full version especially if you might want to add more than this one rule some day. either way notEmpty should work fine with the current 1.3 versions maybe you override the method somewhere? On 5 Okt., 11:12, Jonathan wrote: > On Oct 4, 5:10 pm, euromark wrote: > > > to make sure you should use a fullvalidationarray > > Is that documented anywhere? - Because then the cook book should be > corrected. Otherwise I'm still not sure if the bug is in the book or > in the code... > > Regards > > Jonathan -- 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
Re: Core validation rules examples
On Oct 4, 5:10 pm, euromark wrote: > to make sure you should use a fullvalidationarray Is that documented anywhere? - Because then the cook book should be corrected. Otherwise I'm still not sure if the bug is in the book or in the code... Regards Jonathan -- 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
Re: Core validation rules examples
to make sure you should use a full validation array var $validate = array( 'title' => array( 'myNotEmptyRule' => array( 'rule' => 'notEmpty', ... On 4 Okt., 16:53, Jonathan wrote: > On Oct 4, 11:49 am, Jens Dittrich wrote: > > > Have you checked the bug reports or fixes from version 1.3.6 to 1.3.12? You > > are referring to an quite old release, could have been fixed already. > > I checked the code from the repository, and it didn't seem to have > changed. Now I briefly ran through the tickets, but didn't find anyone > related to this. > > Regards > > Jonathan -- 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
Re: Core validation rules examples
On Oct 4, 11:49 am, Jens Dittrich wrote: > Have you checked the bug reports or fixes from version 1.3.6 to 1.3.12? You > are referring to an quite old release, could have been fixed already. I checked the code from the repository, and it didn't seem to have changed. Now I briefly ran through the tickets, but didn't find anyone related to this. Regards Jonathan -- 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
Re: Core validation rules examples
Have you checked the bug reports or fixes from version 1.3.6 to 1.3.12? You are referring to an quite old release, could have been fixed already. -- 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
Core validation rules examples
In the cook book there are several examples of core validation rules like: var $validate = array( 'title' => array( 'rule' => 'notEmpty', 'message' => 'This field cannot be left blank' ) ); However this seems to trigger a preg_match validation with 'notEmpty' (which is an invalid pattern). Tested with Cake 1.3.6. The solution is to pass an array: 'rule' => array('notEmpty'), Can anyone confirm this? - And if so, is it a bug in the code or in the documentation? Regards Jonathan -- 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