diff --git a/src/Eccube/Form/Type/Admin/ShopMasterType.php b/src/Eccube/Form/Type/Admin/ShopMasterType.php index 8a4adf6de6b..21156d01296 100644 --- a/src/Eccube/Form/Type/Admin/ShopMasterType.php +++ b/src/Eccube/Form/Type/Admin/ShopMasterType.php @@ -134,7 +134,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'required' => false, 'constraints' => [ new Assert\Length([ - 'max' => $this->eccubeConfig['eccube_lltext_len'], + 'max' => $this->eccubeConfig['eccube_ltext_len'], ]), ], ]) @@ -142,7 +142,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'required' => false, 'constraints' => [ new Assert\Length([ - 'max' => $this->eccubeConfig['eccube_lltext_len'], + 'max' => $this->eccubeConfig['eccube_ltext_len'], ]), ], ]) diff --git a/tests/Eccube/Tests/Form/Type/Admin/ShopMasterTypeTest.php b/tests/Eccube/Tests/Form/Type/Admin/ShopMasterTypeTest.php index 0f741c1ed3c..12bd75c7181 100644 --- a/tests/Eccube/Tests/Form/Type/Admin/ShopMasterTypeTest.php +++ b/tests/Eccube/Tests/Form/Type/Admin/ShopMasterTypeTest.php @@ -156,4 +156,16 @@ public function testInValidBasicPointRateRangeMax() $this->form->submit($this->formData); $this->assertFalse($this->form->isValid()); } + public function testInValidGoodTradedMaxLength() + { + $this->formData['good_traded'] = str_repeat('1', $this->eccubeConfig['eccube_ltext_len'] + 1); + $this->form->submit($this->formData); + $this->assertFalse($this->form->isValid()); + } + public function testInValidMessageMaxLength() + { + $this->formData['message'] = str_repeat('1', $this->eccubeConfig['eccube_ltext_len'] + 1); + $this->form->submit($this->formData); + $this->assertFalse($this->form->isValid()); + } }