Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs for getErrorMessagesIndexedByAttribute - array keys must be strings #669

Conversation

ArduanovDanil
Copy link
Contributor

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues

Copy link

what-the-diff bot commented Mar 22, 2024

PR Summary

  • Clarification in code usage
    This update modified our code examples and error messages to be more user-friendly and precise. They added the word "must" for emphasis, highlighting that attribute names must always be strings.

  • Handling of numerical attributes
    Before this update, you could use an array such as [21, 22, 23, 20]. However, this practice will now throw an error because only string-based attributes are accepted. You'll see an error message stating, Top level attributes can only have string type.

  • Improved error descriptions for wrong inputs
    When you now use an array with string keys like ['1' => 21, '2' => 22, '3' => 23, '4' => 20], the system will give a more specific error message, ['4' => ['Value must be no less than 21.']], indicating the exact problem and where it's occurring. This will simplify troubleshooting and make errors less daunting.

docs/guide/en/result.md Outdated Show resolved Hide resolved
docs/guide/en/result.md Outdated Show resolved Hide resolved
docs/guide/en/result.md Outdated Show resolved Hide resolved
docs/guide/en/result.md Outdated Show resolved Hide resolved
arogachev and others added 2 commits March 26, 2024 17:38
Co-authored-by: Sergei Predvoditelev <sergey.predvoditelev@gmail.com>
Co-authored-by: Sergei Predvoditelev <sergey.predvoditelev@gmail.com>
@arogachev
Copy link
Contributor

@ArduanovDanil Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants