Validierung
Nun wollen wir die Nutzereingaben validieren, um sicherzustellen, dass die nötigen Informationen vorhanden sind, und dies auch im richtigen Format.
Hier eine mögliche Validierung:
handle: Person
type: structure
name: Person
drafts: false
structure:
maxDepth: 1
primaryNavigation:
label: Team
icon: icon-user
order: 140
navigation:
icon: icon-user
parent: Team
order: 10
fields:
function:
label: Funktionsbezeichnung
type: text
validation: required
email:
label: Email
type: text
validation: required|email
phone:
label: Telefon
type: text
description:
label: Beschreibung
type: textarea
Last updated