Limit zip code form field to 5 numeric characters

Avatar

Avatar

wpomeroy

Avatar

wpomeroy

wpomeroy

11-11-2020

Is there a best practices way to do form field validation in ACC?  I would like to limit a zip code form field to 5 numeric characters and throwing an error message if the requirements are not met.  I've considered handling this via a split activity or JS but wasn't sure if there is a way to validate in the form activity itself.  Any insight would be appreciated.

View Entire Topic

Avatar

Avatar

wpomeroy

Avatar

wpomeroy

wpomeroy

17-11-2020

Hello @_Manoj_Kumar , I tried this as well.  While it does limit the field to a maximum of 5 characters and removes non-numeric characters, the error that is generated is not user friendly (it errors out on submission rather than performing validation) and it also does not limit less than 5 characters.  I will make this change if there is no other solution but this does not seem best practices from a UX perspective.  Thanks.