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 validation custom error asterisk field #6378

Conversation

ping-yee
Copy link
Contributor

@ping-yee ping-yee commented Aug 15, 2022

Description
Fixes #6245
Supersedes #6352

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them labels Aug 15, 2022
@ping-yee
Copy link
Contributor Author

ping-yee commented Aug 18, 2022

May I rebase to solve resolve conflicts?

@kenjis
Copy link
Member

kenjis commented Aug 18, 2022

May I rebase to solve resolve conflicts?

Yes, please.

@kenjis
Copy link
Member

kenjis commented Aug 18, 2022

Thanks, but it is not "rebase", because you added another commit.
How did you do?

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#updating-your-branch

@ping-yee ping-yee force-pushed the fix-validation-custom-error-asterisk-field branch from 1313060 to 574feb7 Compare August 19, 2022 17:19
@ping-yee
Copy link
Contributor Author

ping-yee commented Aug 19, 2022

@kenjis I reset my git flow and re-rebase, is there the git flow show normally in this time?
After I finish re-rebase, I added the test for validation.

@kenjis
Copy link
Member

kenjis commented Aug 22, 2022

Thank you. It looks good.
If all GitHub Action checks pass, I will merge this.

@kenjis
Copy link
Member

kenjis commented Aug 22, 2022

@ping-yee Please fix coding style.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#php-style

   1) CodeIgniter4/tests/system/Validation/ValidationTest.php (trailing_comma_in_multiline, unary_operator_spaces, not_operator_with_successor_space)
      ---------- begin diff ----------
--- /home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Validation/ValidationTest.php
+++ /home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Validation/ValidationTest.php
@@ -472,7 +472,7 @@
             'foo' => [
                 ['bar' => null],
                 ['bar' => null],
-            ]
+            ],
         ];
         $this->validation->setRules(
             ['foo.*.bar' => ['label' => 'foo bar', 'rules' => 'required']],
@@ -481,7 +481,7 @@
         $this->validation->run($data);
         $this->assertSame([
             'foo.0.bar' => 'Required',
-            'foo.1.bar' => 'Required'
+            'foo.1.bar' => 'Required',
         ], $this->validation->getErrors());
     }
 

      ----------- end diff -----------

Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

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

Please fix coding style.

@ping-yee
Copy link
Contributor Author

@kenjis I have been fix my coding style.
Thank for your continuous helping, I’m very grateful.

@kenjis kenjis merged commit 071cd04 into codeigniter4:develop Aug 22, 2022
@kenjis
Copy link
Member

kenjis commented Aug 22, 2022

@ping-yee Thank you!

@ping-yee ping-yee deleted the fix-validation-custom-error-asterisk-field branch September 12, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Custom validation error for a field with an asterisk.
2 participants