Contact Types
Contact types handle validated communication fields.
Reference
Section titled “Reference”| Type | Expands To |
|---|---|
col.email() | string(255) + email format |
col.phone() | string(50) + E.164 format |
col.url() | string(2048) + uri format |
Example
Section titled “Example”export default table({ id: col.id(), email: col.email(), phone: col.phone(), website: col.url(),});Validation
Section titled “Validation”Email - RFC 5322 compliant validation:
user@example.com ✓invalid-email ✗Phone - E.164 international format:
+14155551234 ✓555-1234 ✗URL - Full URI with scheme:
https://example.com ✓example.com ✗