payload
Version:
Node, React, Headless CMS and Application Framework built on Next.js
25 lines (24 loc) • 534 B
JavaScript
import { email } from '../../fields/validations.js';
export const emailFieldConfig = {
name: 'email',
type: 'email',
admin: {
components: {
Field: false
}
},
hooks: {
beforeChange: [
({ value })=>{
if (value) {
return value.toLowerCase().trim();
}
}
]
},
label: ({ t })=>t('general:email'),
required: true,
unique: true,
validate: email
};
//# sourceMappingURL=email.js.map