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 using form source code and Regex

    Asked by guido_indi on June 12, 2014 at 05:34 AM

    Hello, I'm considering jotform for an insurance company and would like help with the following requirement.

    I have an input field called IBAN which I'd like to validate using the following regex, [a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}

    I have downloaded the source files of my form so I can make changes to them, and I'm not quite sure how to proceed from here- do I need to add my code to jotform.js directly? Whats the best practice for adding custom validation?

    In this forum post ashwin_d offered to supply custom code for these kind of requirements and I'm really hoping the offer still stands

  • Profile Image
    JotForm Support

    Answered by jonathan on June 12, 2014 at 11:06 AM


    Adding your own custom script code, either on the embed script code or to an external js script(hosted on your own server) should work similarly.

    Creating it on external js script file though have more advantage specially in securing your own code. Unlike if you include on the embedded source code, it can be easily seen by just viewing the source code of the web page.

    User Guide: -How-to-get-the-Full-Source-Code-of-your-Form

    If you need a starting guide on your custom validation using Regex, I recommend this thread for start.

    Take special notice on the post by our colleague Abajan where he breaks down the steps to do in creating the customize form using the full source code.

    Hope this help. Kindly inform us if you need further assistance.