Ok, I've got everything working now!

The rules I have ended up with are;

First name: 'rule' => '/^[a-zA-Z]+$/',

Second name: 'rule' => '/^[a-zA-Z]+$/',

Company name: 'rule' => '/^[a-zA-Z\s]+$/',

(Company name should also allow spaces)

I realise that I could use "/i" instead of the [a-zA-Z] bit but as its
working I don't really want to mess it up.

So thanks again to both McBuck DGAF and Dr. Loboto for your help in fixing this.

Felix

On 14 July 2010 14:44, McBuck DGAF <[email protected]> wrote:
> I would defer to Dr. Loboto on this, since he obviously knows more
> about regex than I do.  Maybe he can suggest the correct rule . . . ?
>
> My only response to your last post, Felix, is that you cannot remove "/
> i" since the "/" is required to delimit the regex.  In other words,
> just remove"i".
>
> Good luck.
>
> On Jul 14, 3:32 am, "Dr. Loboto" <[email protected]> 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 [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
>

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