actually I was using the default cakephp postal validation but your
post directed me towards the creation of a custom validation rule that
checked to see if the entry was alphanumeric or just numeric and ran
the proper validation rule from there.

Thanks for the lead!

Josey

On Oct 16, 4:48 pm, "Tamim A." <[email protected]> wrote:
> I'm assuming you have a postal($zipcode) function in your model to handle
> the validation. You could use this to validate the Canadian postal code
> part:
>
> if(preg_match("/^([a-ceghj-npr-tv-z]){1}[0-9]{1}[a-ceghj-npr-tv-z]{1}[0-9]{1}[a-ceghj-npr-tv-z]{1}[0-9]{1}$/i",$zip_code))
>     return true;
>
> Best Regards,
>
> Tamim
--~--~---------~--~----~------------~-------~--~----~
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