What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Custom validation mask for postal code

    Asked by AA_C on September 03, 2013 at 10:42 AM

    Hi,

    I need a validation mask for Canadian postal codes lik so; A#A #A# .

    I tried using this formate in the mask field option and it wants to insert "A's" with a number.

    I cannot put any Alpha I want into the field like; N2M 1V3 I get A2A 1A3 instead. 

    Do I add into the javascript? 

    JotForm.int(function) // something like

    JotForm.setPostalCodeMaskingValidator( 'input_#', 'A#A #A#');

     

    Am I on the right track or out to lunch... please let me know how to proceed.

    Thanks

    Bob

    JotForm style size font
  • Profile Image
    JotForm Support

    Answered by EltonCris on September 03, 2013 at 11:40 AM

    Hi Bob,

    Just use @ symbol for characters and # for numbers.

    On your requirement, it should be:

    @#@ #@#

    Hope this helps. Thanks!

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 03, 2013 at 11:45 AM

    By the way, it is actually written in the description. :)

  • Profile Image

    Answered by AA_C on September 03, 2013 at 12:04 PM

    Hi... OOPS!... I see that...Thanks, Bob