Fixes #4371: Active form client validation wasn't working in case of two models…
Fixes #4371: Active form client validation wasn't working in case of two models having same named fields
When rendering multiple models in the same ActiveForm if any of the field names in the two models is the same then the corresponding attribute in the yiiActiveForm object in yiiActiveForm.js (ie $('form').data('yiiActiveForm').attributes) of the first rendered model is overwritten by the attribute of the last model causing the client-side validation for the overwritten field not to run at all. Example: given two models Car and Owner with attributes {make, age} and {name, age} then if the Car is rendered first its age attribute will not have any client validation.
Showing
Please
register
or
sign in
to comment