Hi Nate :-)

After just having learned about using the Inflector statically I hoped
that this would do the trick ... but when I call Validation from my
component this way I get:

"Fatal error: Call to undefined function: __reset()"

:(

On Feb 21, 3:43 pm, "nate" <[EMAIL PROTECTED]> wrote:
> For the most part, the methods of the Validation class can be accessed
> statically, i.e. to validate a date, you can just do
> Validation::date($date).  There's also an optional $format parameter
> which defaults to 'ymd'.
>
> On Feb 21, 2:09 pm, "Cynthia" <[EMAIL PROTECTED]> wrote:
>
> > I'm writing a component which a bunch of controllers can use to always
> > do the same job: take some dates or date range information and return
> > some conditions.
>
> > I thought it would be cute to have the component also check if those
> > entered dates are in the right format and are valid. But for the life
> > of me, I can't seem to get to the validation thing.
>
> > I tried $uses, $helper, $component. Most of the time there is no
> > error ... but then maybe I don't know the "path" to get to it?
>
> > $this->MyComponent->Validation->validate ... or
>
> > $this->MyComponent->OriginalController->Validation....
>
> > For the moment I'll just C&P the date checking method ... but would be
> > nice to learn how to do this the right way :)


--~--~---------~--~----~------------~-------~--~----~
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