# $field->isValid()

Validates the field content with the given validator and parameters

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/methods.php#L57>

****

```php
$field->isValid(string $validator, mixed ...$arguments): bool
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$validator` (required) | `string` | – | – |
| `...$arguments` | `mixed` | – | A list of optional validator arguments |

## Return type

`bool`

This method modifies the existing `$field` object it is applied to and returns it again.

## Aliases

You can use the following aliases for this field method in your template:

- `$field->v(…)`

## Details

For validators, see <a href="https://getkirby.com/docs/reference/system/validators">list of available validators</a>. In addition, you can use <a href="https://getkirby.com/docs/reference/plugins/extensions/validators">custom validators</a>.

## Examples

```php
<?php if ($page->email()->isValid('email')): ?>
The email address in the email field seems to be valid
<?php endif ?>
```

Some validators require additional arguments:

```php
<?php if ($page->title()->isValid('maxLength', 45)): ?>
The text length is valid
<?php endif ?>
```

```php
<?php if ($page->number()->isValid('between', 5, 10)): ?>
The number is between 5 and 10
<?php endif ?>
```