-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: validation custom error with asterisk field #6352
fix: validation custom error with asterisk field #6352
Conversation
…et up custom errors.
I would like to ask you to change the declaration of methods according to PSR-12 (there is an example here: https://www.php-fig.org/psr/psr-12/#45-method-and-function-arguments). Because the string is longer than 120 characters. |
Improve CSRF protection (for Shield CSRF security fix)
docs: the session_id acquisition method that is not described codeigniter4#5586
'foo.0.bar' => 'Required', | ||
'foo.1.bar' => 'Required', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you really okay with key like 'foo.0.bar'
?
It seems a bit difficult to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But as I known, validation service change the asterisk field to like 'foo.0.bar'
.
As Issue #6245 show that.
system/Validation/Validation.php
Outdated
@@ -203,7 +203,7 @@ public function check($value, string $rule, array $errors = []): bool | |||
* @param array|null $rules | |||
* @param array $data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param array $data | |
* @param array $data The array of data to validate, with `DBGroup`. | |
* @param string|null $originalField The original asterisk field name like "foo.*.bar". |
It seems this fix needs BC break, so I'm fine with the change. |
WARNING: document isn't included in any toctree
`--prefer-source` does not change the file contents.
It is not needed.
v4.2.3 has been released. See https://github.com/codeigniter4/CodeIgniter4/releases Please rebase and add changelog v4.2.4. |
E.g., Check User Guide syntax: user_guide_src/source/libraries/caching.rst#L182 duplicate object description of increment, other instance in /github/workspace/user_guide_src/source/database/query_builder.rst
docs: fix Sphinx errors
….rst docs: improve controllers.rst
…et up custom errors.
…-yee/CodeIgniter4 into fix-validation-custom-error
@kenjis Is this normal? or I do the wrong thing when I rebase my branch... |
@ping-yee This is not normal. You did something wrong. |
@kenjis I use sourcetree to manage my git flow. |
My repository? Do you mean https://github.com/kenjis/Codeigniter4 ?
You did rebase onto develop twice.
If you drop the commits other than you did for this PR (the commits marked below) with But you don't use If you can re-open the new PR, that is also fine. |
@kenjis I say the wrong word. Not |
Okay, if syncing your repository means this https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#syncing-your-repository , you just did rebase twice. In my understanding, if you did rebase twice, the result is the same. The second rebase does nothing. |
Would it be that I don't syncing my repo before I commit my change? |
Sorry, I don't get your situation. After all, the current your branch is abnormal state. Either you did something I couldn't anticipate, or Sourcetree ran strange commands that I couldn't anticipate. |
I think my git flow is too mess to fixed, so I decide to re-open the PR. |
Description
Fixes #6245
Supersedes #6340
Checklist: