Country ZipCode Validation

20 views
Skip to first unread message

Mark Kiel

unread,
Oct 21, 2014, 4:31:14 PM10/21/14
to valida...@googlegroups.com
Afternoon all. I have a design project I am working on to add all countries/states and zip codes to my app and I am trying to figure out validation.

Basically, there are about 196 countries with 50 seperate zipcode formats, including 63 countries that have no zipcodes (and so cannot be required). Normally, with just a few countries (US, Mexico, Canada) I can just write something like isDefined('Country') and getValue('country') in ('US','MX','CA') as a condition, but...

any directions to head in? 


John Whish

unread,
Oct 22, 2014, 6:41:30 AM10/22/14
to valida...@googlegroups.com
Hmmm, first thought would be that you'd need to do a remote call or have a custom method to handle that. So use a "custom" rule. The JS can fire off a AJAX request and server side you can call a method on the object.

have a look at the Nickname rule in the demo:

I think that'll be easier than trying to stick it all in a condition.


--
You received this message because you are subscribed to the Google Groups "ValidateThis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to validatethis...@googlegroups.com.
To post to this group, send email to valida...@googlegroups.com.
Visit this group at http://groups.google.com/group/validatethis.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages