Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Email

Email address field.

SQLite Storage

TEXT column.

Definition

crap.fields.email({
    name = "contact_email",
    required = true,
    unique = true,
    admin = {
        placeholder = "user@example.com",
    },
})

Admin Rendering

Renders as an <input type="email"> element with browser-native validation.

Auto-Injection

When a collection has auth = true and no email field is defined, one is automatically injected with required = true and unique = true. See Auth Collections.