This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Nested Forms validation #5858
Closed
Description
It would be great to add some optional attribute to form element or div with ng-form attribute which will say that validation errors of current form shouldn't affect validation of parent form.
Here is what I mean:
<div ng-form="parentForm">
<input...>some valid input</input>
<div ng-form="childForm" omit-parent-validation="true">
<input...>some INVALID input</input>
</div>
</div>
Result:
parentForm.$valid -> true, childForm.$valid -> false
Same logic may be applied for
parentForm.$pristine -> true, childForm.$pristine -> false