Skip to content

Commit

Permalink
Revert changes in normalize method because it affected ajax validation
Browse files Browse the repository at this point in the history
Ajax validation uses Html::getInputId to generate the input ID, which in turn converts the string to lower case. This is why if we remove the same behavior from BaseColumn::normalize, the ajax validation will not work because the input (attribute) IDs from the ajax response will not match the form input IDs generated by our widget.
  • Loading branch information
Eugene Tupikov committed Mar 30, 2024
1 parent 6713762 commit e00d527
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Yii2 multiple input change log
2.29.0 (in development)
=======================
- fix addind active form fields doesn't work properly in case of 10 rows and more (unclead)
- revert changes in normalize method because it affected ajax validation

2.28.0
=======================
Expand Down
2 changes: 1 addition & 1 deletion src/components/BaseColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ abstract public function getElementName($index, $withPrefix = true);
* @return mixed
*/
private function normalize($name) {
return str_replace(['[]', '][', '[', ']', ' ', '.'], ['', '-', '-', '', '-', '-'], $name);
return str_replace(['[]', '][', '[', ']', ' ', '.'], ['', '-', '-', '', '-', '-'], strtolower($name));
}

/**
Expand Down

0 comments on commit e00d527

Please sign in to comment.