Skip to content

fix #3579 【メールフィールド新規登録・編集:5.1.x】詳細設定にある「グループ名」と「グループ入力チェック」にハイフンを入れるとエラーになる件を修正#4410

Open
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#3579

Conversation

@kaburk

@kaburk kaburk commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

よろしくお願いします!

Copilot AI review requested due to automatic review settings June 4, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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系のみ」であること、および新規メソッドのテストを追加

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.

2 participants