This may be more of a regex question, but I can't seem to get some
validation working inside Cake that seems to work fine outside of
Cake.

A field needs to either be (1) a valid number, or (2) nothing.  So, in
effect, "You don't have to enter this, but if you do, it better be a
number."

This...

/[0-9]+|/

...doesn't work.  To me, that regex says, "Any sequence of numeric
values, or the empty string."

What does it say to you?

On the same note, I'm trying to the same thing with a date.  This
doesn't work either:

/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])|/

Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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