docs: Document how custom error messages is being handled#8
docs: Document how custom error messages is being handled#8DannyvdSluijs wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR documents how custom error messages are handled by adding a new section to the advanced-topics.md file that explains how to access constraint information for creating custom error messages.
- Added documentation for custom error message handling with example code
- Updated generated site files to reflect the documentation changes
- Removed references to discontinued pages (configuration, community-guide)
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| _docs/advanced-topics.md | Added custom error messages section with PHP code example |
| _site/docs/advanced-topics.html | Updated HTML with new custom error messages documentation |
| _site/docs/search.json | Updated search index with new content |
| Multiple _site files | Updated asset hashes and removed references to discontinued pages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| $data = '{"age": "John Doe"}' | ||
| $jsonSchemaAsString = ' { "type": "object", "properties": { "age": { "type": "integer" } } } '; |
There was a problem hiding this comment.
Missing semicolons at the end of these PHP statements. Both lines should end with semicolons to be valid PHP syntax.
| customErrorMessagePatternFunction($error['constraint']['name']), | ||
| ...$error['constraint']['params'] |
There was a problem hiding this comment.
The array access pattern is incorrect. Based on the context and typical error structure, this should likely be $error['constraint'] for the constraint name and the parameters structure needs clarification. The current syntax assumes a nested structure that may not exist.
Fixes #4