2.2.2 Fields & Validation — Rules, Constraints, and Defaults
Fields define the individual data elements that make up a content type. In Praisma Hub, fields are strongly typed, explicitly validated, and configurable, ensuring both editorial flexibility and structural integrity.
This section explains how fields are defined, how validation rules are applied, and how defaults influence system behavior.
Field Types
Praisma Hub supports a variety of field types, including but not limited to:
Text and rich text
Numbers and booleans
Dates and times
Media references
Relations to other content entries
Structured or repeatable field groups
Each field type has well-defined behavior in the editor, storage layer, and rendering output.
Validation Rules
Validation rules ensure that content entered into fields meets defined requirements. Common rules include:
Required or optional fields
Minimum and maximum lengths or values
Format constraints (for example, URLs or email addresses)
Uniqueness constraints where applicable
Validation is enforced consistently at both UI and backend levels, preventing invalid data from being stored.
Default Values
Fields may define default values that:
Pre-fill content during creation
Enforce consistent initial states
Reduce repetitive editorial work
Defaults are applied predictably and transparently, without overriding user input.
Constraints and Integrity
Constraints ensure structural integrity across content:
Relation constraints prevent invalid references
Field-level constraints enforce schema consistency
System-level safeguards prevent destructive changes
These constraints protect both editors and downstream systems.
Accessibility Considerations
Field definitions support accessibility by:
Providing labels and descriptions for assistive technologies
Enforcing meaningful input structures
Supporting validation feedback that is perceivable and understandable
This ensures that content creation workflows remain inclusive.
Summary
Fields and validation rules define how data is captured, validated, and protected within the CMS. By combining strong typing with clear constraints and defaults, Praisma Hub ensures high-quality, reliable content.