Single Line Text is the most basic type of question, seen in every survey. Works best for obtaining respondents' information such as names, E-mail addresses and telephone numbers.
SurveyCake's Single Line Text question type offers not only the common features found in all question types, such as Required, Note, Add Media, Indent, Style, Hide, and Timer, but also Input Settings including 5 types of Text Validation and Custom Placeholder Text.
These features guides respondents in providing answers that adhere to the specified format. If an answer does not meet the validation format, the system will display a corresponding warning reminder and prevent the submission of incorrect data. Text Validation not only ensures data accuracy but also enhances convenience for respondents when filling in their answers.


Currently, Text Validation supports validation for 5 types of input formats: text, email, phone number, URL, and API. They will be introduced in order below.
If you would like to collect answers consisting of text only or a combination of "text and numbers" (e.g. a student ID consisting of 7-9 alphanumeric characters), you can enable the general text validation and set the required number of characters within a specific range. In this way, before answering, the question will display a default guiding message "Input text here" and it can also block all answers that do not meet the specified conditions. The number of characters can be limited within a specific range.



'Normal Text' validation format within the specific range of character limit"
When no response has been entered yet, there will be an default guiding instructional text 'Input text here’.
When the input is less or more than the set character limit, the system will display a invalid prompt and restrict submission.
If you would like to collect respondents' phone numbers, you can set the validation to phone number so that only answers in a numeric format can pass the validation. Furthermore, you can specify the answer to start with 09, and the length of the answer to be between 10 and 10 characters, for example, as phone numbers typically have a fixed format.




When no response has been entered yet, there will be an default guiding instructional text 'Please input your phone number'.
The prompt that respondents will see when starting with wrong numbers
The numeric keypad will automatically appear on the mobile devices when the text validation is set as Phone Number.

3 & 4. Email & URL
To collect answers such as email or website addresses, you can utilize the Text ValidationVerification feature by setting it to "email" or "URL". This will display relevant default guidance text and ensure that only valid email addresses or website URLs are accepted.


“Email” Text Validation
“URL” Text Validation
The corresponding keypad will automatically appear on the mobile devices when the text validation is set as Email or URL.
When text validation is set to 'Email,' the mobile device will automatically display the corresponding keyboard (e.g., @ or . symbols)
When text validation is set to 'URL,' the mobile device will automatically display the corresponding keyboard (e.g., / or .com symbols)


You also have the option to integrate your custom API into the survey, and the real-time response from the API will be displayed on the page. Additionally, you can utilize the API results to determine whether the question validation has passed. For more detailed information, please refer to the API.

FAQ
Can Skip Logic and Conditional Branching be applied to Single Line Text?
No, currently Skip Logic and Conditional Branching only can be applied to Multiple Choice and Checkboxes and other question types are not available yet.
Summary
Facilitate the experience of filling out surveys by setting Text ValidationVerification in Single Line Text. Keep this tip in mind when designing your next survey!