fix #3579 【メールフィールド新規登録・編集:5.1.x】詳細設定にある「グループ名」と「グループ入力チェック」にハイフンを入れるとエラーになる件を修正#4410
Open
kaburk wants to merge 1 commit into
Open
fix #3579 【メールフィールド新規登録・編集:5.1.x】詳細設定にある「グループ名」と「グループ入力チェック」にハイフンを入れるとエラーになる件を修正#4410kaburk wants to merge 1 commit into
kaburk wants to merge 1 commit into
Conversation
…ック」にハイフンを入れるとエラーになる件を修正
Contributor
There was a problem hiding this comment.
Pull request overview
本PRは、bc-mail のメールフィールド新規登録・編集において、詳細設定の「グループ名」「グループ入力チェック」にハイフン(-)を含めるとバリデーションエラーになる問題(#3579)を解消するための修正です。MailFieldsTable のバリデーションを「グループ系フィールド」と「field_name(DBフィールド名として使う)」で分離し、意図した文字種制限をそれぞれに適用しています。
Changes:
group_field/group_valid用にハイフン許容の新バリデーションメソッドhalfTextMailGroupField()を追加し、既存のhalfTextMailField()(小文字+_のみ)とは分離group_field/group_validの validation rule をhalfTextMailGroupFieldに切り替え- 期待仕様を担保するためのテスト(hyphen 許容・各メソッドの正否)を追加
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/bc-mail/src/Model/Table/MailFieldsTable.php | group系フィールド向けにハイフン許容の検証を追加し、バリデータで適用先を切り替え |
| plugins/bc-mail/tests/TestCase/Model/Table/MailFieldsTableTest.php | hyphen の許容範囲が「group系のみ」であること、および新規メソッドのテストを追加 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
よろしくお願いします!