Difference between revisions of "Validating Postal Codes"
From SmartWiki
(Created page with 'You can use JavaScript Validation to ensure the postal code standard field on contact profiles conforms to a certain pattern. For example, Canadian postal codes follo…') |
|||
Line 5: | Line 5: | ||
''Example: M5V 2H1'' | ''Example: M5V 2H1'' | ||
+ | |||
+ | ==Steps== | ||
+ | # Click on [[Global Settings]] | ||
+ | # Under ''User & Contact Settings'', click on the hyperlink for ''User/Contact Standard Field Settings'' | ||
+ | # From the left-hand list of standard fields, click on the hyperlink for ''Zip / Postal Code'' | ||
+ | # In the ''Validation'' setting, enter ''isMatch(@value@, 'LNL NLN', true)'' | ||
+ | # Enter a ''Validation Message'', such as "Postal Code must be in the format of 'A#A #A#', example: 'M5V 2H1'." | ||
+ | |||
+ | [[Image:PostalCodeValidation.png|link=|500px]] | ||
+ | |||
+ | When a postal code is entered, if the Postal Code is not in the specified format, the user will be prompted with the ''Validation Message''. | ||
==See Also== | ==See Also== |
Revision as of 15:42, 6 December 2013
You can use JavaScript Validation to ensure the postal code standard field on contact profiles conforms to a certain pattern. For example, Canadian postal codes follow the pattern of LNL NLN Where L = a letter N = a number
Example: M5V 2H1
Steps
- Click on Global Settings
- Under User & Contact Settings, click on the hyperlink for User/Contact Standard Field Settings
- From the left-hand list of standard fields, click on the hyperlink for Zip / Postal Code
- In the Validation setting, enter isMatch(@value@, 'LNL NLN', true)
- Enter a Validation Message, such as "Postal Code must be in the format of 'A#A #A#', example: 'M5V 2H1'."
When a postal code is entered, if the Postal Code is not in the specified format, the user will be prompted with the Validation Message.