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

    Check if a field contains 4 different numbers and 2 letters

    Asked by FOTORIP on April 14, 2015 at 03:03 AM

    Hi, is it possible to check a field if the content contains for example '3numbers+4characters' ? Example: 451ABCD

    I know that this is possible for email addresses for example, but can I define this myself ?




  • Profile Image

    Answered by Ben on April 14, 2015 at 10:44 AM

    This certainly seems like an interesting challenge Steven.

    There are 2 ways you could achieve something like this - that I can think of right of my head and I made a quick demo of them both on this form: http://form.jotformpro.com/form/51034688764968

    1st way - using Input mask

    We can set the Input Mask on a field so that we are accepting ##@@## or in other words: number number letter letter number number (without any spaces between)

    This is achieved by clicking on the field (text box in this example) and then on Input Mask button in the toolbar.

    This is great way to make sure that first two entries are numbers, followed by to letters and again with two numbers

    2nd way - using Form Calculation

    Basically, if you add the filed to Form Calculation widget and make it read it as a number, it will ignore the characters and only capture numbers. Once we have them, all we need is to check with conditions if the value in it is in range of 1.000-10.000.

    The reason for this range is that we get a 4 digit number and as such it can be 1000 or more, but up to 9999

    Do let us know if these would work for you and if you have any questions.

    Also, you can clone the form to your account by following these steps: How to Clone an Existing Form from a URL so that you can take a closer look at how it was made.