Exact matches only
Search in title
Search in content
Search in posts
Search in pages

Custom Field Validation

Field Validation allows you to accept only the data that meets your required format. You can choose from predefined validation types or create custom validation codes. The predefined types are:

  • alpha – only letters
  • alphanumeric – letters and digits
  • alphaspace – letters and white spaces
  • alphanumericspace – letters, digits and white spaces
  • numeric – only digits
  • numericplus – digits and the characters +, -, .
  • email – email addresses
  • URL (webpage) – webpage URLs (e.g. http://123formbuilder.com/docs/)
  • date – YYYYMMDD – date as year/month/day
  • date – DDMMYYYY – date as day/month/year
  • date – MMDDYYYY – date as month/day year
  • date – MMDDYYYY + picker – date as month/day/year and a calendar in which users can pick the date instead of typing it in
  • date – DDMMYYYY + picker – date as day/month/year and a calendar in which users can pick the date instead of typing it in
  • date – MMYYYY – date as month/year
  • time – time coordinates (hours and minutes)
  • custom

You can change the validation for a form field only if you are on a Gold plan or higher.

With custom validation, you can define your own validation code. Choose Custom in the validation dropdown list and type your code in the box that shows up. The code will have a format such as CCCCNNAAAAAANN. The code letters that you may use are:

  • C – character (letter)
  • N – numeric (digit)
  • A – alphanumeric (letter or digit)
  • L – lowercase letter
  • U – uppercase letter
  • S – white space

You can also use other types of validation, for example: REGEXP:/^(?:\+?1[-. ]?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/, which is the international phone number format. In this case, select Custom in the Field Validation dropdown list and paste the code above in the input box.

If your form requires even more complex field validation, contact us and we’ll help you get it done.

33 comments

  1. Hi, is there a way to put custom validation for a set of data? For example, the email a person keys has to be from this list of emails (from my database)

    1. Hi Joan!
      If your database contains a very large amount of data you will need to connect your form to your external database. This can be achieved with our Virtual database and dynamic prefill feature, which is available on our Enterprise plan. For more details about our corporate plans, please request a demo to receive more details.

      On the other hand, for a smaller list you can use Field Rules applied on your email field.

      Thank you!

  2. How can I input custom regex message for that field?

    This value is not validated by validator “regex” seems not telling user what exactly the format should be.

    1. Hello Alvin,

      Our apologies for the late reply.

      If you do not need all those information collected through the form, make sure that only the relevant fields are set to be required. Click on any field in your Form Editor to open its Edit Field panel on the left side of the page and uncheck the Required option.

      Also, you can eliminate empty fields from the email notification. Please follow the guidelines presented here

      Thank you!

    1. Hello Jill!
      To hide the information that is typed in the field behind dashed, may I suggest you add a Password field to the form and rename it to SSN. But be careful not to use the field before or after an email field, for safety reasons. If you require further assistance, don’t hesitate to contact us at support[at]123formbuilder.com
      Thanks!

  3. hi, i want a validation for a phone number this exact way:
    971559945971

    this means 12 numeric digits, NO spaces, no dash, no plus

    can u please help?

    1. Hello Talal!

      I apologize for replying this late. Customer support service goes faster if you contact us via our contact page or use the live chat window, when it appears on our platform during working hours. Now regarding your inquiry.

      Add a Number field to your form and make sure it uses the numeric validation. Next, go to the additional settings of the field, located on the second tab. Use the boxes to set the minimum and maximum length of the accepted input to 12, which is the number of digits (or characters) the phone number you provided in the example. Once you’ve done this, form users will not be able to submit the form unless they provide their phone number in the correct format.

      I hope this helped. For more assistance, don’t hesitate to contact our support specialists.

      Thanks!

  4. I need to create a password reset request form. Our pass word requirement AlphaNumeric with at least 1 capital letter and at least one special character ie. !.@# etc. Can be in any order… I don’t see anything that would quite accomplish that…

    Thanks for any assistance.

    Russ

    1. Hi Russ!

      I’m sorry but at this time we don’t have one that lets you randomly add a word that fits that description.

      You can create a custom field that will request those characters, but your users would have to create their password in the exact order you specify, which doesn’t leave much room for them to come up with a secure or original password.

  5. I’m not sure why but this web site is loading incredibly
    slow for me. Is anyone else having this problem or is it a
    problem on my end? I’ll check back later and see if the problem still exists.

    1. Hello Tony!

      Are you referring to the number format of the Phone field? Because if that is the case, you may click the field within the Form Editor and use the Number Format drop down that appears in the Edit Field panel, on the left. Read more in our documentation at: http://wix.123formbuilder.com/docs/can-i-use-the-phone-field-in-the-standard-format-for-my-country/.

      For further assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form.

      Thanks!

  6. I have a custom field validation in my form that must be an exact 4 digit number to submit (essentially a code). If someone enters the incorrect numbers, the error message reads “Expected input: custom” Is there a way to change that to make it make more sense to the visitor? I’d like it to possibly read “Invalid code” or something to that effect.

    1. Hello Mike!

      To change the text of the error message, go to Form SettingsTranslations section of your form and hit the Add Language button. Select English and hit Done. Next, hover over the added language until you see the Customize button on the right. Click Customize and scroll down to System Messages, within the lightbox. In System Messages, look for the line Expected input and type “Invalid code” in the input box on the right. Afterwards, scroll down until you see the line custom and change it to “ ” (which will add a space instead of the text “custom”).

      Press Save to exit the lightbox and you are done.

      For further assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form.

      Thanks!

  7. Hi, We have a contact form that we have set up for our field team, and i need to get the first letter of certain fields capitalised, however the data to be entered can be of variable lengths so i cannot use a standard custom field validation method as it would force the exact amount of characters to be entered.

    All i need is for the first letter to be a capital, but then for it to allow a variable amount of text afterwards such as the first entry being John and the next being Timothy etc.

    Can anyone help please?

    Thanks

  8. I have created a quote page on my website, and utilized your 123formbuilder. There is a field called Food Budget for this Event. I want to know how I can allow users to enter a comma, dollar sign, and period in this field i.e. $1,000.00

  9. I want to have my visitors enter their web address but I do not want the validation to fail because of the missing “http://” how do I achieve that?

    1. Hello Simon!

      You could add a textbox field to your form, set it on URL for the validation and type in the text “http://” inside the Default Value box. Whenever the form visitors access your form, they can click on the input of the field and complete it with their website.

      For further assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form.

      Thanks!

  10. How can I use custom validation to enforce a negative number. For example I want a user to input -100. If they enter “100”, it should not allow it.

    1. Hello!

      We do not support custom validation for negative numbers only, but what you can do is use field rules and hide the submit the button if the input is bigger than -1. You can also use field instructions to inform your form visitors that only negative numbers are permitted in the field. Here are the steps:

      1. In My Forms, select your form and go to Settings.

      2. In Settings, go to RulesField Rules.

      3. Hit Add Rule and set this condition: If name of your field is greater than -1 then hide Submit Button.

      How does this work: if the person who fills out the form types in the field the value 0, for example, the submit button will disappear and the form can not be submitted. But if the person types in -1, the submit button will reappear. The same for -2, the submit button will still be present. But if the person types in 1, 2 or 100, the submit button will disappear again.

      In the Form Editor you can add Instructions to your field, to inform your form users of the input required in the field.

      For further assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form.

      Thanks!

    1. Hello!

      We haven’t got the option to automatically change form inputs in Uppercase. You can, however, use a JavaScript code that contains this functionality and link it to your form. If you upgrade to the Platinum plan, you can use the WebHooks integration that applies these changes on your server through a script. The script and server, however, are provided by you.

      Our available plans: http://wix.123formbuilder.com/features-matrix.html

      What you can do to prevent form users from adding form inputs in Lowercase is to add a custom field validation to your textboxes. Select custom under field validation and add the value U. Form users will not be able to submit the form unless they type their input in Uppercase. If you upgrade to Gold, you can use Translations to change the system message from Expected input: custom to any text you want, such as Expected input: Uppercase letters.

      For more questions or assistance, please contact our Support Team at support@123formbuilder.com and they will gladly help.

      Thanks!

    1. Hello!

      To change error messages on your form, simply go to the Form SettingsTranslations section, add a default language (e.g. english) and hit Customize (hover mouse over the line to see the button). In the lightbox, go to System Messages to translate/change error messages that your form users might see. You don’t need to enable translations on your form. Read more here.

      For questions or assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com

      Thanks!

  11. I want to change the input value of a date to month/year but I can’t fine the ‘custom validation’ drop down menu on my forms? Where so I find it? Thanks, John

    1. Hello John!

      To change the input value to month/year , you’ll need to add a Textbox field to your form, instead of the Date field. Drag and drop the Textbox on your form and go to Field Validation from the Edit Field panel. Once there, select date-MMYYYY from the dropdown list. Remember to include a field instruction for your form visitors to add ‘/’ between the month and the year, otherwise they will not be able to submit the form.

      For more questions or assistance, please don’t hesitate to contact our support specialists at support@123formbuilder.com

      Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Frequently Asked Questions

Here is a list of the most frequently asked questions. For more FAQs, please browse through the  FAQs page.

Is this service free?
Yes, we offer a free form builder service. Just sign up to the Basic plan and you are all set. This plan is forever free, but you are limited with a few features only, such as 5 forms per account, 100 submissions per month and you have to keep the backlink to 123FormBuilder on your forms. Check out our features matrix for more information.
How many forms can I create?
It depends on the service plan you are on. Higher service plans enable more features, including more web forms for your account. If you need more forms, go to the My Account section of your account and click the upgrade button. To create an unlimited number of forms, either upgrade to the Platinum service plan or higher. Consult our features matrix for more information.
How can I publish my forms?
You can publish your forms in many ways, by using their direct URL or HTML link, embedding them with a JavaScript code, Inline HTML or iFrame, using the Facebook app or the WordPress plugin, using popups, the Blogger code snippet and many more. Once you have created and customized your form, go to the Publish section to complete your work. Read more in our documentation.
How do I change my form design?
You can change the design of your form in the Themes section, which is located in your form settings. We offer a set of more than 30 predefined form themes for your forms, but you can also create your own from scratch. You can customize the submit button, the logo and more. To apply your own stylesheets, all forms come with a custom CSS editor.

Can't find what you're looking for?