Sid, You're spot on mate! Works perfectly.
Thank you. J On Mar 19, 4:31 pm, Sid Bachtiar <sid.bacht...@gmail.com> wrote: > Try > > sfValidatorRegex(array('pattern' => '/^[0-9]{8}$/')) > > ^ = beginning > $ = end > > Note: I'm no regex guru and I have not tested the above, so finger crossed. > > > > On Thu, Mar 19, 2009 at 6:25 PM, John Masson <jmas...@gmail.com> wrote: > > > Hey All, > > > Trying to do some VERY simple regex validation to check for an 8 digit > > number (no more, no less), but having some issues... > > > This: > > sfValidatorRegex(array('pattern' => '/[0-9]{8}/')) > > > Validates the first 8 characters to make sure they are digits, and > > accepts 8 digits as it should, but lets you put ANYTHING after those 8 > > digits... more numbers, letters, whatever. > > > This: > > sfValidatorRegex(array('pattern' => '[0-9]{8}')) > > > Doesn't seem to let anything through... > > > At a bit of a loss as using some online regex testers shows either of > > these to be ok, but Symfony doesn't like it?? > > > Any ideas? > > > Thanks, > > John > > -- > Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---