Custom validation mask for postal code

  • Profile Image
    AA_C
    Asked 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

  • Profile Image
    EltonCris
    Answered 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
    EltonCris
    Answered on September 03, 2013 at 11:45 AM

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

  • Profile Image
    AA_C
    Answered on September 03, 2013 at 12:04 PM

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