Custom validation using form source code and Regex

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