Skip to content

Commit e00d527

Browse files
author
Eugene Tupikov
committed
Revert changes in normalize method because it affected ajax validation
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.
1 parent 6713762 commit e00d527

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Yii2 multiple input change log
44
2.29.0 (in development)
55
=======================
66
- fix addind active form fields doesn't work properly in case of 10 rows and more (unclead)
7+
- revert changes in normalize method because it affected ajax validation
78

89
2.28.0
910
=======================

src/components/BaseColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ abstract public function getElementName($index, $withPrefix = true);
280280
* @return mixed
281281
*/
282282
private function normalize($name) {
283-
return str_replace(['[]', '][', '[', ']', ' ', '.'], ['', '-', '-', '', '-', '-'], $name);
283+
return str_replace(['[]', '][', '[', ']', ' ', '.'], ['', '-', '-', '', '-', '-'], strtolower($name));
284284
}
285285

286286
/**

0 commit comments

Comments
 (0)