Skip to content

Commit

Permalink
Merge pull request #414 from FriendsOfCake/task/error-message
Browse files Browse the repository at this point in the history
Remove uneeded class on error message container
  • Loading branch information
ADmad authored Nov 30, 2024
2 parents ae96c70 + 51e8ff3 commit 779abd8
Show file tree
Hide file tree
Showing 22 changed files with 111 additions and 111 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class FormHelper extends CoreFormHelper
*/
protected array $_templates = [
'error' =>
'<div id="{{id}}" class="ms-0 invalid-feedback">{{content}}</div>',
'<div id="{{id}}" class="invalid-feedback">{{content}}</div>',
'errorTooltip' =>
'<div id="{{id}}" class="invalid-tooltip">{{content}}</div>',
'label' =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function testDefaultAlignCheckboxControlWithError()
['label' => ['class' => 'form-check-label', 'for' => 'users']],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -344,7 +344,7 @@ public function testDefaultAlignCheckboxControlWithErrorAndHelp()
['label' => ['class' => 'form-check-label', 'for' => 'users']],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'users-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -391,7 +391,7 @@ public function testDefaultAlignCheckboxControlWithErrorAndHelpAndOptions()
['label' => ['class' => 'form-check-label', 'for' => 'users']],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -480,7 +480,7 @@ public function testDefaultAlignCheckboxControlContainerOptionsWithError()
['label' => ['class' => 'form-check-label', 'for' => 'users']],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -587,7 +587,7 @@ public function testDefaultAlignCheckboxControlNestedInputWithError()
]],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -871,7 +871,7 @@ public function testDefaultAlignCheckboxControlInlineWithError()
['label' => ['class' => 'form-check-label', 'for' => 'users']],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -955,7 +955,7 @@ public function testDefaultAlignCheckboxControlInlineContainerOptionsWithError()
['label' => ['class' => 'form-check-label', 'for' => 'users']],
'Users',
'/label',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function testDefaultAlignColorControlWithError()
'aria-describedby' => 'color-error',
'value' => '#ffffff',
],
['div' => ['id' => 'color-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'color-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -297,7 +297,7 @@ public function testDefaultAlignColorControlWithErrorAndHelp()
'aria-describedby' => 'color-error color-help',
'value' => '#ffffff',
],
['div' => ['id' => 'color-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'color-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'color-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -339,7 +339,7 @@ public function testDefaultAlignColorControlWithErrorAndHelpOptions()
'aria-describedby' => 'color-error custom-help',
'value' => '#ffffff',
],
['div' => ['id' => 'color-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'color-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -420,7 +420,7 @@ public function testDefaultAlignColorControlContainerOptionsWithError()
'aria-describedby' => 'color-error',
'value' => '#ffffff',
],
['div' => ['id' => 'color-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'color-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function testDefaultAlignDateTimeControlWithError()
'aria-describedby' => 'created-error',
'value' => $now->format('Y-m-d H:i:s'),
],
['div' => ['id' => 'created-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'created-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -343,7 +343,7 @@ public function testDefaultAlignDateTimeControlWithErrorAndHelp()
'aria-describedby' => 'created-error created-help',
'value' => $now->format('Y-m-d H:i:s'),
],
['div' => ['id' => 'created-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'created-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'created-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -390,7 +390,7 @@ public function testDefaultAlignDateTimeControlWithErrorAndHelpOptions()
'aria-describedby' => 'created-error custom-help',
'value' => $now->format('Y-m-d H:i:s'),
],
['div' => ['id' => 'created-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'created-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -476,7 +476,7 @@ public function testDefaultAlignDateTimeControlContainerOptionsWithError()
'aria-describedby' => 'created-error',
'value' => $now->format('Y-m-d H:i:s'),
],
['div' => ['id' => 'created-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'created-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function testDefaultAlignFileControlWithError()
'aria-invalid' => 'true',
'aria-describedby' => 'file-error',
]],
['div' => ['id' => 'file-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'file-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -281,7 +281,7 @@ public function testDefaultAlignFileControlWithErrorAndHelp()
'aria-invalid' => 'true',
'aria-describedby' => 'file-error file-help',
]],
['div' => ['id' => 'file-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'file-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'file-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -321,7 +321,7 @@ public function testDefaultAlignFileControlWithErrorAndHelpOptions()
'aria-invalid' => 'true',
'aria-describedby' => 'file-error custom-help',
]],
['div' => ['id' => 'file-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'file-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -396,7 +396,7 @@ public function testDefaultAlignFileControlContainerOptionsWithError()
'aria-invalid' => 'true',
'aria-describedby' => 'file-error',
]],
['div' => ['id' => 'file-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'file-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -491,7 +491,7 @@ public function testDefaultAlignFileControlInputGroupWithError()
'append',
'/span',
'/div',
['div' => ['id' => 'file-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'file-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public function testDefaultAlignMultipleCheckboxControlWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -535,7 +535,7 @@ public function testDefaultAlignMultipleCheckboxControlWithErrorAndHelp()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'users-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -610,7 +610,7 @@ public function testDefaultAlignMultipleCheckboxControlWithErrorAndHelpOptions()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -685,7 +685,7 @@ public function testDefaultAlignMultipleCheckboxControlCustomAriaDescribedByWith
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'users-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -819,7 +819,7 @@ public function testDefaultAlignMultipleCheckboxControlContainerOptionsWithError
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -938,7 +938,7 @@ public function testDefaultAlignMultipleCheckboxControlNestedInputWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -1386,7 +1386,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -1519,7 +1519,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineContainerOptionsWit
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -1867,7 +1867,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithError()
'/label',
'/div',
'/fieldset',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public function testDefaultAlignRadioControlWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -524,7 +524,7 @@ public function testDefaultAlignRadioControlWithErrorAndHelp()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'users-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -599,7 +599,7 @@ public function testDefaultAlignRadioControlWithErrorAndHelpOptions()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -739,7 +739,7 @@ public function testDefaultAlignRadioControlContainerOptionsWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -1232,7 +1232,7 @@ public function testDefaultAlignRadioControlInlineWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -1367,7 +1367,7 @@ public function testDefaultAlignRadioControlInlineContainerOptionsWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -1490,7 +1490,7 @@ public function testDefaultAlignRadioControlInlineNestedInputWithError()
'option 2',
'/label',
'/div',
['div' => ['id' => 'users-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'users-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function testDefaultAlignRangeControlWithError()
'aria-invalid' => 'true',
'aria-describedby' => 'height-error',
],
['div' => ['id' => 'height-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'height-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down Expand Up @@ -337,7 +337,7 @@ public function testDefaultAlignRangeControlWithErrorAndHelp()
'aria-invalid' => 'true',
'aria-describedby' => 'height-error height-help',
],
['div' => ['id' => 'height-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'height-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => ['id' => 'height-help', 'class' => 'form-text']],
Expand Down Expand Up @@ -383,7 +383,7 @@ public function testDefaultAlignRangeControlWithErrorAndHelpOptions()
'aria-invalid' => 'true',
'aria-describedby' => 'height-error custom-help',
],
['div' => ['id' => 'height-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'height-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
['div' => [
Expand Down Expand Up @@ -470,7 +470,7 @@ public function testDefaultAlignRangeControlContainerOptionsWithError()
'aria-invalid' => 'true',
'aria-describedby' => 'height-error',
],
['div' => ['id' => 'height-error', 'class' => 'ms-0 invalid-feedback']],
['div' => ['id' => 'height-error', 'class' => 'invalid-feedback']],
'error message',
'/div',
'/div',
Expand Down
Loading

0 comments on commit 779abd8

Please sign in to comment.