How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread John Maxim
'username' = array( 'notEmpty' = array( 'rule' = 'notEmpty', 'message' = 'This field cannot be blank', 'last' = true ), 'username' = array( 'rule' = 'isUnique',

Re: How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread Ryan Schmidt
On Dec 18, 2010, at 03:01, John Maxim wrote: 'username' = array( 'notEmpty' = array( 'rule' = 'notEmpty', 'message' = 'This field cannot be blank', 'last' = true ), 'username' =

Re: How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread John Maxim
Hi Thanks very much it works like a charm. However, I have a question, please take a look at the code below: 'email' = array( 'notEmpty' = array( 'rule' = 'notEmpty', 'message' = 'This field cannot be blank',

Re: How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread John Maxim
I think I understand now. Is it because the first name is the array name, and the following is the first array key ? therefore, subsequent is second keyand on... ? On Dec 18, 6:29 pm, John Maxim goog...@gmail.com wrote: Hi Thanks very much it works like a charm. However, I have a

Re: How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread Ryan Schmidt
On Dec 18, 2010, at 04:36, John Maxim wrote: On Dec 18, 6:29 pm, John Maxim wrote: It works with the same array key 'email' ? I tried, it works. May I know why ? I think I understand now. Is it because the first name is the array name, and the following is the first array key ?

Re: How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread John Maxim
Yes Ryan I understand, the clearest explanation I can ever find. Thanks! On Dec 18, 7:03 pm, Ryan Schmidt google-2...@ryandesign.com wrote: On Dec 18, 2010, at 04:36, John Maxim wrote: On Dec 18, 6:29 pm, John Maxim wrote: It works with the same array key 'email' ? I tried, it works. May I

Re: How to write Array in Validation with more than 2 rules ?

2010-12-18 Thread euromark
@ryan a while ago I proposed in the cake tickets that last=true should be the default value because it makes more sense. i hope it will be this way in 2.0^^ On 18 Dez., 12:21, John Maxim goog...@gmail.com wrote: Yes Ryan I understand, the clearest explanation I can ever find. Thanks! On Dec