Validation Error
This error occurs when the request payload values do not conform to the data rules, types, or business constraints defined in the Domain Modeler.
Error Response Example (RFC 9457)
Section titled “Error Response Example (RFC 9457)”{ "type": "https://docs.apinow.app/errors/validation", "title": "Validation Error", "status": 422, "code": "VALIDATION_ERROR", "detail": "Field validation failed", "instance": "/api/v1/users", "errors": [ { "detail": "Value 'invalid-email' is not a valid email address.", "pointer": "/email", "code": "validation" }, { "detail": "Password must be at least 8 characters long.", "pointer": "/password", "code": "validation" } ]}Troubleshooting Guide
Section titled “Troubleshooting Guide”For API Consumers (What it means & how to fix)
Section titled “For API Consumers (What it means & how to fix)”- Check Field Errors: Inspect the
errorsarray in the response. Each item contains:pointer: The JSON pointer pointing to the invalid property in your request payload (e.g.,/email).detail: A descriptive message of why the field failed validation.
- Payload Format: Ensure that data types are correct (e.g. sending a number instead of a string for numeric properties) and that required fields are not omitted.
For API Authors (Domain & API Modeler notes)
Section titled “For API Authors (Domain & API Modeler notes)”- Semantic Validators: The Serverless Engine automatically attaches validation rules based on applied Semantic Modules (like checking formatting for
Email,Phone,URL, or constraints onPasswordandUserRole). - Required Properties: Ensure that fields marked as “Required” in your Domain Modeler are actually necessary, or provide a default value to prevent validation failures.