Thanks for the reply Bruno.
I tryied both ways, and works perfectly.

But, if the book says that IS_NULL_OR is deprecated, don't you think,
it will be better to show a "un-deprecated" example? IMHO will be less
confusing.

bye.

PS: sorry again for my bad english.

On 7 sep, 10:43, Bruno Rocha <[email protected]> wrote:
> Both will work.
>
> http://zerp.ly/rochacbruno
> Em 07/09/2011 10:36, "juanduke" <[email protected]> escreveu:
>
>
>
>
>
>
>
> > Hi!
> > Reading the validators section, it says:
>
> > IS_NULL_OR
> > Deprecated, an alias for IS_EMPTY_OR described below.
>
> > IS_EMPTY_OR
> > Sometimes you need to allow empty values on a field along with other
> > requirements. For example a field may be a date but it can also be
> > empty. The IS_EMPTY_OR validator allows this:
>
> > requires = IS_NULL_OR(IS_DATE())
>
> > I think the last sentence must be:
> > requires = IS_EMPTY_OR(IS_DATE())
>
> > Or please tell me if I'm wrong.
>
> > Bye.
>
> > PS: Sorry for my bad english

Reply via email to