Re: [C] Problem with custom validation
I last hit the svn about 2 weeks ago and found that the validation using html->tagE... versus validator->tagE... wasn't quite the same. The html helper expected a regex string as an argument while yours accepts an array. Perhaps it has changed. I will give the ajax and recent svn a look-see. A tutorial would be awesome. Abba Dr. Tarique Sani wrote: > > > On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote: >> minutes ago ) attempting to use the validator and still had $html->tagE.. >> in >> my views that I missed. Oops. > Thanks for the feedback. > > If you use the latest SVN version it is 100% backwards compatible (or > atleast thats what we tried to make it) > > A tutorial has been written - hopefully I will be able to edit it this > weekend and put it online. > If you want to see AJAX validation in action - try commenting on the > Cheesecake demo > > Thanks once again > > Tarique > > -- > = > PHP for E-Biz: http://sanisoft.com > Cheesecake-Photoblog: http://cheesecake-photoblog.org > = > > > > > -- View this message in context: http://www.nabble.com/Problem-with-custom-validation-tf3252461.html#a9106276 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [C] Problem with custom validation
On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote: > minutes ago ) attempting to use the validator and still had $html->tagE.. in > my views that I missed. Oops. Thanks for the feedback. If you use the latest SVN version it is 100% backwards compatible (or atleast thats what we tried to make it) A tutorial has been written - hopefully I will be able to edit it this weekend and put it online. If you want to see AJAX validation in action - try commenting on the Cheesecake demo Thanks once again Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [C] Problem with custom validation
It would also seem useful to add an html helper or override the html->tagErrorMsg so that it could accept both the old and the cheesecake methods. That would make it more portable. I have been caught ( about 20 minutes ago ) attempting to use the validator and still had $html->tagE.. in my views that I missed. Oops. Abba Bryant Dr. Tarique Sani wrote: > > > On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote: >> >> >> If you are using the validator class from CheeseCake or others ( I assume >> here - not sure if it Tariq's or someone else's and he is simply using >> it. ) >> the correct method is to use > > The class is ours (cheesecake team) but heavily draws from work of others > >> echo $validator->tagErrorMsg( 'Project/start_date' ); > > I don't think that she is using the cheesecake validator - OTOH if > someone is using cheesecake validators we would appreciate feedback / > bug reports > > Cheers > Tarique > > -- > = > PHP for E-Biz: http://sanisoft.com > Cheesecake-Photoblog: http://cheesecake-photoblog.org > = > > > > > -- View this message in context: http://www.nabble.com/Problem-with-custom-validation-tf3252461.html#a9095474 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [C] Problem with custom validation
Well now. * I * have used it some for my own development / learning cycles a number of times. The one thing I noticed is the order of the errors and messages in the validation arrays matters. You need to put them in the specific order you want the tests checked. IE valid not empty needs then the regex, so that it must pass the first to make it to the second. I hope that was clear. Anyways I am loving what I have seen it capable of so far. Are the licencse issues I should be aware of before I consider using / modifying it for my own aside from the notes at the top of each file from svn? I should also note I am not using the ajax validation or any javascript nor the cheese helper. I did notice some jquery action in your svn. Sexy. Abba Bryant Dr. Tarique Sani wrote: > > > On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote: >> >> >> If you are using the validator class from CheeseCake or others ( I assume >> here - not sure if it Tariq's or someone else's and he is simply using >> it. ) >> the correct method is to use > > The class is ours (cheesecake team) but heavily draws from work of others > >> echo $validator->tagErrorMsg( 'Project/start_date' ); > > I don't think that she is using the cheesecake validator - OTOH if > someone is using cheesecake validators we would appreciate feedback / > bug reports > > Cheers > Tarique > > -- > = > PHP for E-Biz: http://sanisoft.com > Cheesecake-Photoblog: http://cheesecake-photoblog.org > = > > > > > -- View this message in context: http://www.nabble.com/Problem-with-custom-validation-tf3252461.html#a9095461 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [C] Problem with custom validation
On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote: > > > If you are using the validator class from CheeseCake or others ( I assume > here - not sure if it Tariq's or someone else's and he is simply using it. ) > the correct method is to use The class is ours (cheesecake team) but heavily draws from work of others > echo $validator->tagErrorMsg( 'Project/start_date' ); I don't think that she is using the cheesecake validator - OTOH if someone is using cheesecake validators we would appreciate feedback / bug reports Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [C] Problem with custom validation
If you are using the validator class from CheeseCake or others ( I assume here - not sure if it Tariq's or someone else's and he is simply using it. ) the correct method is to use echo $validator->tagErrorMsg( 'Project/start_date' ); I am NOT sure if this is the codebase you are working with but it sounds likely. Also, note the lack of message in the function call. In the validator class I am familiar with ( see above ) the messages depend on the error and are found through the validation array in the model. Abba Bryant vidya-6 wrote: > > > Hai, > > I have one problem with custom validation. In my model class validater > function is > > function validates() > { > // Validation code goes here >if($error) > return false; > > } > > Validation worked for me, but i can't display the error message on the > view using tagErrorMsg. > ie; > echo $html->tagErrorMsg('Project/start_date', 'please enter a valid > date') ; > > Can any one solve this problem? > > Thanks, > Vidya. > > > > > > -- View this message in context: http://www.nabble.com/Problem-with-custom-validation-tf3252461.html#a9086606 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---