martijnpeek
Junior Member
Posts: 3
Registered: 8/22/2006
Member Is Offline
|
| posted on 8/22/2006 at 03:02 PM |
|
|
validation for dutch zip code
Hi, i am new with the tigra form validator and i am asking my self if is possible to validate a dutch zipcode which can be like the following example
: 1111 AA
I am trying it with a customized version of email ( 'zip' : /^[w-.]+.[a-z]{2,4}$/,) but that doesn't work
have anyone an idea what i have to fill to validate both numbers , spaces and characters
thanks for your attention
|
|
|
tigra
Administrator
Posts: 1920
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/22/2006 at 11:22 PM |
|
|
so what exactly is the format? 4 numbers, optional whitespace then two letters?
then regexp is: /^\d{4}\s*\w{2}$/
|
|
|
martijnpeek
Junior Member
Posts: 3
Registered: 8/22/2006
Member Is Offline
|
| posted on 8/23/2006 at 12:08 AM |
|
|
| Quote: | Originally posted by tigra
so what exactly is the format? 4 numbers, optional whitespace then two letters?
then regexp is: /^\d{4}\s*\w{2}$/ |
yes exactly, and it works, so d{4} is for the numbers, s* is for the white space and w{2} is for the letters ??
thanks very much
|
|
|
tigra
Administrator
Posts: 1920
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/23/2006 at 11:13 AM |
|
|
http://www.google.com/search?q=regexp+syntax+reference
|
|
|