Thanks guys.
Dave
-Original Message-
From: Andy Dirnberger [mailto:andy.dirnber...@gmail.com]
Sent: November-29-10 10:56 AM
To: CakePHP
Subject: Re: Common Punctuation
The 'i' means case insensitive, so you don't need the A-Z anymore:
'/^[\-\'\.\sa-z]+$/i
>
> > On 29 November 2010 00:25, Dave Maharaj wrote:
>
> >> Thanks,
>
> >> I have 'rule' => array('custom', '/^[\-\'\.\sa-zA-Z]+$/'),
>
> >> But the ' will not go thru.
>
> >> I know im an idiot...
ll not go thru.
>>
>> I know im an idiot..lol
>>
>> Dave
>>
>> -Original Message-
>> From: Miles J [mailto:mileswjohn...@gmail.com]
>> Sent: November-28-10 8:42 PM
>> To: CakePHP
>> Subject: Re: Common Punctuation
>>
>&
\-\'\.\sa-zA-Z]+$/'),
>
> But the ' will not go thru.
>
> I know im an idiot..lol
>
> Dave
>
> -Original Message-
> From: Miles J [mailto:mileswjohn...@gmail.com]
> Sent: November-28-10 8:42 PM
> To: CakePHP
> Subject: Re: Common Punctuat
Thanks,
I have 'rule' => array('custom', '/^[\-\'\.\sa-zA-Z]+$/'),
But the ' will not go thru.
I know im an idiot..lol
Dave
-Original Message-
From: Miles J [mailto:mileswjohn...@gmail.com]
Sent: November-28-10 8:42 PM
To: CakePHP
Sub
; > I know its not so much Cake question so forgive me ahead of time.
>
> > But does anyone know a regex for common punctuation? I want to put
> > validation on my "City" field where it's a-z and also allow ' - and . City
> > should not have any numbers
Off the top of my head:
/^[\-\.a-zA-Z]+$/
Regex is probably the easiest approach. Just set it as a custom
validation rule.
On Nov 28, 1:30 pm, "Dave Maharaj" wrote:
> I know its not so much Cake question so forgive me ahead of time.
>
> But does anyone know a regex for co
I know its not so much Cake question so forgive me ahead of time.
But does anyone know a regex for common punctuation? I want to put
validation on my "City" field where it's a-z and also allow ' - and . City
should not have any numbers. Open to any other ideas that you have