I want to validate zipcode or pincode in address fields. that's why I am trying to write regular express which is just except a-z
(upper and lower both), 0-9
numbers, round brackets (eg. ()
) and hyphen -
and space. But some rules must be followed like single white space can not be on first position, two or more white space can not be allowed.
some of invalid entries
1254588
125 255
((125)) 255
125--255
(125) (255)
125>2458
EL$ 2458
@L$ 2458