java script validation

Posted by Mesh_2010 under JavaScript on 4/7/2011 | Points: 10 | Views : 1844 | Status : [Member] | Replies : 3
Hi,

Zip code Java Script Validation at client side.
country (Canada) Ex A1A2A3

Thanks
RameSH sinGH



Responses

Posted by: Prabhakar on: 4/8/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Mesh_2010

i suggest u . . use it . . Regular expression for Zipcode Validation . . .and chek this link . . it's help for you . .


http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/

Best Regard's
Prabhakar

Mesh_2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 4/11/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
try this

Javascript Regex Literal:

US Zip Codes: /(^\d{5}$)|(^\d{5}-\d{4}$)/
var isValidZip = /(^\d{5}$)|(^\d{5}-\d{4}$)/.test("90210");


Thanks
Karthik
www.f5Debug.net

Mesh_2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 4/11/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
check this link as well

http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/

Thanks
Karthik
www.f5Debug.net

Mesh_2010, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response