email
The email
property is used to define a valid email value.
import { atom, email } from '@iridiumcms/core';
export const sample = atom('sample', {
myEmail: email(),
});
Configuration
The email
field takes an optional configuration object with the following properties:
- defaultValueThe default value of the field. Defaults to
string
undefined
. - displayNameThe display name of the field. Defaults to the name of the property.
string
- domainsA list of valid email domains. Defaults to
string[]
undefined
. - requiredWhether the field is required. Defaults to
boolean
false
. - searchableWhether the field is searchable. Defaults to
boolean
false
. - filterableAllows filtering the field. Defaults to
boolean
false
. - layoutThe layout of the field in the admin. Defaults to
LAYOUT
LAYOUT.full
.