Blog Post

Microsoft Forms Blog
2 MIN READ

Validate open text responses in Microsoft Forms

junyuB's avatar
junyuB
Icon for Microsoft rankMicrosoft
Jul 12, 2024

I'm excited to share that you can apply more rules to your open text questions in Microsoft Forms, enhancing the accuracy and quality of the data collected! Now you can create rules that help you validate the format of answers like emails and URLs. You can also require specific text in the answer and provide minimum or maximum length requirements. Let’s dive in and see how we can better use this in our daily work. You can also try setting restrictions yourself with this template.

 

Imagine you are creating a customer satisfaction survey. You add the following restrictions to your open text question to ensure the responses are meaningful and actionable:

 

Input must contain a certain word

To gather customers’ feedback on their overall experience with a specific product, ensure their response includes keywords such as "experience" to guide them in providing relevant feedback.

 

Set input must contain a specific word

Input length

In such a form, we usually ask customers for additional comments or suggestions. We can set a character limit for responses, such as no more than 250 characters, to encourage clear and sufficiently detailed feedback that is easy to analyze and take action on.

 

Set character limit

Email validation

In the end of the survey, you need to ask respondents to provide their email address for follow-up. Now you can validate that the input is a properly formatted email address to ensure accurate communication.

 

Set validation on email address

Responder experience              

When responders open the survey, they will find default text in the text box reminding them to input answers in the correct format. If they enter an incorrect format, they will be unable to submit the form.

 

Default text to remind right format

We only listed a few options you can use for your open text questions. Please refer to the table below for all the rules available.

 

Restriction Option under restriction
Number

Is number

Greater than

Greater than or equal to

Less than

Less than or equal to

Equal to

Not equal to

Between

Not between

Whole number
Text

Contains

Doesn’t contain
Length

Min count

Max count
Email /
URL /

 

This feature is currently fully available for Microsoft account holders and we will gradually roll out to commercial users.

Updated Jul 12, 2024
Version 4.0
  • lilyliu20090403's avatar
    lilyliu20090403
    Copper Contributor

    when Microsoft Form has date and time question? this will be more useful for Microsoft Users. 

  • jpalmer-san's avatar
    jpalmer-san
    Copper Contributor

    Is there an article available that describes the details of the email restriction?

     

    Is it simply checking for a text string followed by an @ sign, and then another string followed by a period and more text?

     

    Or is it advanced enough to check for common domains and returns an error if someone typo's a .ocm instead of .com?

     

    I'm a big fan of the addition of restrictions and validation and hope Microsoft continues to include more features in this space.

  • VFX_Pro's avatar
    VFX_Pro
    Brass Contributor

    Really? Not simple date validation?  Why is it taking 4 years to have a powerful form tool like Infopath?

     

    Thanks Microsoft for failing to provide an appropriate powerful solution after retiring InfoPath.  Microsoft forms is so basic it's barely usable in any website. Google forms, Cognito forms are way more powerful and flexible.

     

    Formatting, Design, Date/time validation, Visibility Rules, Conditions, regex (social security number, phone number), etc...

  • tpeak's avatar
    tpeak
    Copper Contributor

    I'm working with math faculty to create math equations (college algebra) in Forms that they can share with students. My goal is to have the instructor open a Form containing the equation. Students can collaborate in groups to find the answer and then provide the answer to the instructor through a response to an open response or a choice of answers. 

     

    It would be great if the math equations could be written in Tex or LaTex. Is there a way to do this now, or is this a future feature? I can create Tex/LaTex equations in Poll Everywhere, but I hate Poll Everywhere. 

     

    I know that I can also put the laTex/Tex question in a PowerPoint slide, and then show the response options in a Poll on the next slide, but that is an extra step that I don't want to take. 

  • Steven_80's avatar
    Steven_80
    Copper Contributor

    These additions are much needed, the ability to restrict the amount of text entered and email validation especially.

  • Steven_80's avatar
    Steven_80
    Copper Contributor

    jpalmer-san 

     

    "Is it simply checking for a text string followed by an @ sign, and then another string followed by a period and more text?"

     

    Yes, it seems to checking only the format, rather than the validity of the actual email.

  • Azelin's avatar
    Azelin
    Copper Contributor

    With the email restriction - does anyone know if more than one email can be entered?

  • Microsoft wants us to buy Power Apps to replace InfoPath but I work for a community college that cannot afford the Power Apps licenses so we have to buy a non-Microsoft solution instead.