This guide shows you how to validate document structure using Joyfill’s schema validation system.Documentation Index
Fetch the complete documentation index at: https://docs.joyfill.io/llms.txt
Use this file to discover all available pages before exploring further.
What is Schema Validation
Schema validation checks if your JSON document follows the correct Joyfill document structure before creating a form.Enabling/Disabling Schema Validation
Manual Validation
How Schema Validation Works
When validateSchema = true:- Document is validated against the Joyfill schema during editor creation
- If validation fails, an error is set and onError callback is triggered
- If validation passes, the editor is created normally
| Error Code | Description | Solution |
|---|---|---|
| ERROR_SCHEMA_VALIDATION | Document structure is invalid | Fix document structure |
| ERROR_SCHEMA_VERSION | Version incompatibility | Update SDK or document |
Important Notes
⚠️ Default Behavior: Schema validation is enabled by default (validateSchema = true)
🚫 Not Recommended: Disabling schema validation can lead to crashes - only use for testing
🔍 Error Details: Schema errors include both user-friendly messages and technical details
⚡ Validation Timing: Schema validation happens during editor creation, not during form interaction