> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/tasks-2/task-field-validation-types.md).

# TaskFieldValidationTypes

## Introduction

`TaskFieldValidationTypes` define which validation rules can be attached to [TaskFields](/api-reference/tasks-2/task-fields.md).

## List

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/field-validation-types`

**Request Keys**

No additional request keys.

**Example Request**

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/field-validation-types', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

**Example Response**

```json
[
  {
    "id": "required",
    "default_config": {},
    "sort_number": 1
  }
]
```

## Show

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/field-validation-types/{formFieldValidationType}`

**Request Keys**

| Key                       | Type   | Default | Description                                  |
| ------------------------- | ------ | ------- | -------------------------------------------- |
| `formFieldValidationType` | string | -       | Validation type ID (for example `required`). |

**Example Request**

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/field-validation-types/required', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

**Example Response**

```json
{
  "id": "required",
  "default_config": {},
  "sort_number": 1
}
```

## Allowed validation type keys

* `required`
* `email`
* `phone`
* `url`
* `number`
* `minmax`
* `items-count`
* `boolean`
* `datetime`
* `after-before`
* `file`
* `mimetypes`
* `last-modified`
* `in`
* `not-in`
