Skip to content

Conversation

DannyvdSluijs
Copy link
Contributor

Fixes #4

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +76 to +77
$data = '{"age": "John Doe"}'
$jsonSchemaAsString = ' { "type": "object", "properties": { "age": { "type": "integer" } } } ';
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolons at the end of these PHP statements. Both lines should end with semicolons to be valid PHP syntax.

Copilot uses AI. Check for mistakes.

Comment on lines +89 to +90
customErrorMessagePatternFunction($error['constraint']['name']),
...$error['constraint']['params']
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add content on https://jsonrainbow.github.io/docs/docs/advanced-topics.html#using-custom-error-messages

1 participant