Thanks FallernJehova.

I have already gone through the article, and this is what is has to
say about blank:

"blank validates that a field is blank or contains only whitespace
characters like tabs or spaces. It doesn't look very useful to me."

I know what it does, but what I wanted to know was any
situation/example where using it will be useful. One use that came to
my mind was checking that the id field is empty (if present) when
adding a new record. (Of course there are other ways to this):

var $validate = array(
   'id' => array(
      'rule' => 'blank',
      'on' => 'create'
   )
);

Any other situation, where using the blank may be useful?

Thanks


On 9/29/07, FallenJehova <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I think this article will help you:
>
> http://cakebaker.42dh.com/2007/01/03/validation-with-cakephp-12/
>
> Good luck!
>
> On 29 sep, 10:49, Ahsan <[EMAIL PROTECTED]> wrote:
> > Hi guys,
> >
> > I was going through all the built-in rules for data validation in 1.2.
> > I was just wondering whats the use of the blank rule? Since it is
> > there, I am sure it has a use, but I am not being able to figure it
> > out.
> >
> > Any ideas?
> >
> > Thanks.
> >
> > --
> > Regards
> > Ahsanul Bari
>
>
> >
>


-- 
Regards
Ahsan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to