Online live 1on1 chat - Textbox1 validating

With a little extra effort, you can create much more complicated validation patterns on your own!As you initially create a Textbox question, you are given the option to choose from Number, Email, Percent and Date (either MM/DD/YYYY or DD/MM/YYYY) as the type of validation.

textbox1 validating-61

Send payment proof to [email protected] 31 days after purchase date.

When using Textbox questions, often times you'll want to validate the data your respondents enter.

Code Snippet: Validate the Date Selection Invoking the Set Error method of the Error Provider control displays an error indicator image next to the control specified as the first argument to the the Set Error method.

The string specified in the second argument in the function invocation is displayed as the tooltip when the mouse is moved over the Error indicator.

A good place for this is the additional instructions section of your question title.

The simplest approach would just be to create a method that returns a bool and tries to parse the text into a Date Time object. Parse(string) method should work just fine, and if the text is not in the correct format you will catch the exception thrown.

In many situations you need to enter only numeric values in the Textbox.

Here you can see some useful techniques that accept only numbers in the textbox.

If you select a numeric validation, you can choose to Force Whole/Positive Numbers and/or Allow Values Between a minimum and maximum range.(Optional) When using validation we recommend displaying an example format to your survey respondents.

Tags: , ,