Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Postal Code format validation pls?

Avatar

Level 8

Hello

I have bunch of fiedls on my form, well, among them 2 are as below

1) Country and 2)Postal code

Now, user can enter any country (say, US, CA, France, China, Bangkok) in the COUNTRY field, as we knew every country has its OWN specific postal code format.

My requeremenrt is: I have to throw an alert message to the user if user enters a wrong FORMAT postal code for the associated entered counrty in the COUNTRY field?

For example, if user enters US in country field, user not suppose to enter 'A122BBB5666BDNM' some crap

Pls. let me know know can i achive by using JS (code snippet pls.), pls. let me know which event i must out that JS

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,  Sounds a bit like sample 2 in this post, http://blogs.adobe.com/formfeed/2008/12/canadianus_address_data_captur.html, only covers two countries, but might get you started.  Bruce

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,  Sounds a bit like sample 2 in this post, http://blogs.adobe.com/formfeed/2008/12/canadianus_address_data_captur.html, only covers two countries, but might get you started.  Bruce