Skip to main content

Setting Form Validations incl. Making a Field Mandatory


Rob Place

Reading time 3 mins

 


Introduction

 

The validation function on form questions allows you to ensure questions are completed in a certain way, e.g., you can stop a user completing a form if they haven't answered Yes to a Yes/No question (often used to prompt users to confirm that they have undertaken tasks or checks). Validations are also used to make fields/questions mandatory, i.e. a user cannot submit the form if they have left a question blank.

 


Making a field mandatory

 

  • Select the question that needs to be made mandatory on your middle editing canvas.

 

  • On the left-hand panel, select the “Validation” tab.
Validation tab.
  • Set the validation so that the question is only valid if “it has a value”.
Validation field.
  • Enter the text that you would like to show if the user does not answer the question and tries to save the form.

 

  • Once you have done this, your validation should look like the below.
Validation example.
  • Click Add Rule to save it.

 

  • You will now see the rule appearing below the validation options.
Validation rule.
  • To remove the rule, simply click on the dustbin icon

 


Setting a field to require a specific answer

  • Select the question that needs to be answered in a set way on your middle editing canvas. In this example we will use a Yes/No question, however you can follow the same process for other question types. 

 

  • On the left-hand panel, select the “Validation” tab (this is the same place as where you set if a question is mandatory or not)

 

  • Set the validation so that the question is only valid if “it contains the exact value”, then below it set the toggle to either YES or NO accordingly (or to the relevant answer for your scenario) - Remember, you are selecting the answer that you want them to select in order to complete the form here. E.g. if they need to answer Yes in order to complete the form, set the toggle to Yes.
Yes No toggle.

 

  • Enter the text that you would like to show if the user does not answer the question in the right way and tries to save the form

  

Display message.
  • Once you have done this, your validation should look something like the below:
Validation example.

 

  • Remember to click Add Rule to save it.

 

  • You will now see the rule appearing below the validation options.
Validation rule.
  • To remove the rule, simply click on the dustbin icon
     
This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings