> For the complete documentation index, see [llms.txt](https://help.dscout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.dscout.com/private-panels/screeners/validation-regex-in-screeners.md).

# Validation Regex in screeners

Sometimes in a screener, you want to be able to control what can be added to a field. For example, if you are trying to capture a phone number from a respondent, you would use the Number Input. But how do you confirm that what the respondent is entering matches a typical phone number?

In Private Panels, there is an option to add "Answer validation" to the **Number Input** and **Short Answer** question types. This allows you the ability to restrict what can be submitted. Additionally, you can add **Custom error text** to the question, letting the respondent know why their answer wasn't accepted.

![](/files/d6fce8346236485dab5ab353450360f9f1cd49e5)

Private Panels currently has two types of validation, Email and Regex.

## Email

When selecting Email, any Email address entered into the field would have to minimally match the following: <a@b.co>. This means that email address like <test@dscout.com> would be accepted, but test.dscout.com would not (since it does not contain an @).

## Regex

If you have more advanced needs, you can select Regex. When selecting Regex, you add your own Regular Expression that all respondent answers will have to match. For example, if you are adding a Regex for a phone number, it might look like this:

```
^\[2-9\]\\d{2}-\\d{3}-\\d{4}$
```

This Regex would accept a number like '800-555-5555', but would reject a number like '000-000-0000' or '2126661234'.

For further examples of how to build a regex that suites your needs, <https://regexlib.com/Default.aspx> is a great resource.

**Note:** Private Panels was previously managed outside of Dscout, so you may see a different logo and URL in some places. If you have any questions, contact <support@dscout.com>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.dscout.com/private-panels/screeners/validation-regex-in-screeners.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
