RE: Different Validations on 1 Table (Model) Based on the Action

2007-03-07 Thread Mariano Iglesias
legroups.com [mailto:[EMAIL PROTECTED] En nombre de scragz Enviado el: MiƩrcoles, 07 de Marzo de 2007 06:56 a.m. Para: Cake PHP Asunto: Re: Different Validations on 1 Table (Model) Based on the Action This overrides built-in validates and allows you to pass an array of field names that you want to c

Re: Different Validations on 1 Table (Model) Based on the Action

2007-03-07 Thread scragz
--- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -----Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTE

Re: Different Validations on 1 Table (Model) Based on the Action

2007-03-07 Thread Dr. Tarique Sani
On 3/7/07, cecplex <[EMAIL PROTECTED]> wrote: > > What if I have 15 fields and I only want 2 of them validated. Is there > no construct available to let me validate a specific set of fields? > Did you try out validating anything? CakePHP will validate only those fields which are provided to it

RE: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread Mariano Iglesias
googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de cecplex Enviado el: Martes, 06 de Marzo de 2007 08:15 p.m. Para: Cake PHP Asunto: Re: Different Validations on 1 Table (Model) Based on the Action What if I have 15 fields and I only want 2 of them validated. Is there no construc

RE: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread Rhett Waldock
rhett waldock clearsite new media -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cecplex Sent: Tuesday, March 06, 2007 5:10 PM To: Cake PHP Subject: Re: Different Validations on 1 Table (Model) Based on the Action If that's the case, how would I ha

RE: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread Rhett Waldock
t; VALID_NOT_EMPTY ); rhett waldock clearsite new media -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cecplex Sent: Tuesday, March 06, 2007 5:15 PM To: Cake PHP Subject: Re: Different Validations on 1 Table (Model) Based on the Action

Re: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread cecplex
If that's the case, how would I handle errors in a login form? On Mar 6, 6:09 pm, "Rhett Waldock" <[EMAIL PROTECTED]> wrote: > Hello, > > Can you provide more information about how you are using save() in your > controllers? > > The model-defined validation rules that apply automatically to save(

Re: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread cecplex
What if I have 15 fields and I only want 2 of them validated. Is there no construct available to let me validate a specific set of fields? On Mar 6, 6:01 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Set up all your validation rules in the model (such as username not empty > and only letter

RE: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread Mariano Iglesias
Set up all your validation rules in the model (such as username not empty and only letters, email valid, etc. etc.). On the save() action you validate with the model as usual. On the login action, instead of calling save() on the model you would call validates(), and since you want only to valid

RE: Different Validations on 1 Table (Model) Based on the Action

2007-03-06 Thread Rhett Waldock
Hello, Can you provide more information about how you are using save() in your controllers? The model-defined validation rules that apply automatically to save() would usually be used in an insert or update operation. Presumably, the signup action you describe would be in this category. However