I thought the "i" at the end of the rule I suggested would make it
case insensitive, as described in the manual. (Like I said, regex is
not my thing, I am still learning there . . .)  Anyway, try removing
the "i" from the end of the last rule you suggested (ie, '/^[a-zA-Z]
$/') and see if that works.

On Jul 13, 1:36 pm, Felix <fe...@felixfennell.co.uk> wrote:
> OK, that validation rule works, kinda.
>
> If I remove the validation for the company name (temporarily) the rest
> of the form validation works, with one exception.
>
> The new regex doesn't allow for upper case letters, only lower case.
>
> I tried changing it from; '/^[a-z]$/i'
>
> to: '/^[a-z][A-Z]$/i' --didn't work
>
> to: '/^[a-zA-Z]$/i' --didn't work
>
> I think there's something basic I'm missing here!
>
> As for the company name that still gives the same errors as before.
>
> Thanks for your help thus far, Felix.
>
> On Jul 13, 3:13 pm, McBuck DGAF <mcbuckd...@gmail.com> wrote:
>
> > Sorry, I wasn't looking at the regex itself, I was just looking at the
> > way you implemented it (and we have not addressed your 'company_name'
> > issue at all, but the solution here should be readily adaptable to
> > that).
>
> > I am no regex expert, but wouldn't the following get you what you
> > want?:
>
> > 'rule' => '/^[a-z]$/i',
>
> >  (the regex must be delimited by "/", which is probably the source of
> > your current error)
>
> > On Jul 12, 7:18 pm, Felix <fe...@felixfennell.co.uk> wrote:

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to