$field->isValid()
Validates the field content with the given validator and parameters
$field->isValid(string $validator, mixed $arguments = null): boolParameters
| Name | Type | Default | Description | 
|---|---|---|---|
| $validator * | string | – | |
| $arguments | mixed | null | A list of optional validator arguments | 
Return type
bool
Aliases
You can use the following aliases for this field method in your template:
- $field->v(…)
Example
<?php if ($page->email()->isValid('email')): ?>
The email address in the email field seems to be valid
<?php endif ?>