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.
[feature request] request adding $validate() method on FormController #14517
Closed
Description
The idea is to force a form to call $validate()
on all its controls. Where this is useful is when the validity of a form control depends on the values of other controls in the form.
My current workaround is this:
function revalidate(form)
{
angular.forEach(form, function (value, key)
{
if (typeof value === 'object' && value.hasOwnProperty('$modelValue')) value.$validate();
});
}