Pin Code / Zip Code validation error in XForms

Hi,

I'm creating XForm for my application, where i need to validate the
pincode/zip code of six digits, i have used below constraint

constraint="(regex(., '^[0-9]{6}$'))"

everything works fine, if I enter hypen '-' or dot '.' as a input,
it's not checking for validation,

Kindly help me to resolve this

Thanks
S

it's not sustainable for us to help with every regex. please look at
http://www.regular-expressions.info to learn more about regex.
http://stackoverflow.com/questions/32282/regex-testing-tools might
also be useful.

ยทยทยท On Mon, Sep 12, 2011 at 13:12, Sel K wrote: > Hi, > > I'm creating XForm for my application, where i need to validate the > pincode/zip code of six digits, i have used below constraint > > constraint="(regex(., '^[0-9]{6}$'))" > > > > everything works fine, if I enter hypen '-' or dot '.' as a input, > it's not checking for validation, > > Kindly help me to resolve this > > Thanks > S > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >