> For the complete documentation index, see [llms.txt](https://eohelp.weaver.com.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eohelp.weaver.com.co/design-a-new-workflow/4-regular-expressions-regex-in-field-validation.md).

# 4 Regular Expressions(Regex) in Field validation

During form design, we need to think about valid the user input to ensure the data quality, below is the place to validate the data format.

<figure><img src="https://1526800164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F50DeL6mO9sNbAZBSEdaN%2Fuploads%2F9x3lTD1iNKIuHMwjuBHE%2FiShot_2023-12-15_10.16.17.png?alt=media&amp;token=4afd6a5f-b31e-4991-8a4d-0d55e56957ae" alt=""><figcaption></figcaption></figure>

## 1 Email&#x20;

```
^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$
```

## 2 URL&#x20;

```
^(https?:\/\/)?([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})(:[0-9]{1,5})?(\/.*)?$
```

## 3 Numeric

```
^\d+(?:\.\d+)?$
```

## 4. Date&#x20;

### 4.1 YYYY-MM-DD

```
^(?:19|20)\d\d-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$
```

### 4.2 DD-MM-YYYY or DD.MM.YYYY or DD/MM/YYYY

```
 ^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
```

## 4.3 DD-mmm-YYYY or DD.mmm.YYYY or DD/mmm/YYYY

```
^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]|(?:Jan|Mar|May|Jul|Aug|Oct|Dec)))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2]|(?:Jan|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)(?:0?2|(?:Feb))\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9]|(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep))|(?:1[0-2]|(?:Oct|Nov|Dec)))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
```

## 5 Phone number

```
^\+?[1-9]\d{1,14}$
```

## 6 Postal code

There is no single regular express could handle all the postal code format around the word, but here is the list for each country(158 regex's in total)

<https://stackoverflow.com/questions/578406/what-is-the-ultimate-postal-code-and-zip-regex/7185241#7185241>
