Skip to Content
0
Former Member
May 03, 2013 at 07:25 PM

FormCalc: Validation Pattern & Message

374 Views

Hello,

In my form I need to have a script for a field which allows Postal Codes for CDN/Zip Codes for the US.

This script needs to check the value of my country field and if it is the US then it should only allow an entry of text{99999}and if anyone enters anything different then it should come up with a message saying entry can only be ##### or something like that. If it is Canada then it should check that the pattern being entered is text{A9A 9A9} and then of course a message of some sort.

I know this is easy to do within the form, however becuase I need to check the country and then apply different rules I am not quite sure how to go about it. If you have any ideas please let me know ... actual script examples would be appreciated.