Thanks for the custom rule, I've used it and it seems to work well.
Thanks again.
c5
--~--~-~--~~~---~--~~
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
Hi
I've got a model that uses
'rule'=array('postal',null,'uk')
to successfully validate UK postcodes.
However testing has shown that many people enter their postcodes in
forms without using the space, so:
W1W 5QU -- validates
W1W5QU -- does not validate
Has anyone got any tips on getting
It looks like the Validation regex needs to be updated. This:
$_this-regex = '/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]?
[0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
should be:
$_this-regex =
'/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]?[\s]?[0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
Ditto for the Canadian one.
On Mon, Aug 31, 2009
Or just create a custom validation rule, where you can add your own regexp -
remember, that not changing the core will always be so helpful sooner or
later ;)
Faifas
http://www.voveris.eu/
On Mon, Aug 31, 2009 at 18:58, brian bally.z...@gmail.com wrote:
It looks like the Validation regex
What I meant was that perhaps an enhancement ticket should be opened
to have the core changed.
On Mon, Aug 31, 2009 at 4:54 PM, Aivarasfaifas1...@gmail.com wrote:
Or just create a custom validation rule, where you can add your own regexp -
remember, that not changing the core will always be so