Open
Description
Expected Behaviour
The CSS3 :valid
and :invalid
pseudo-classes are applied correctly when using Angular in-built form validation. CSS rules that apply to these elements work out of the box for angular forms that are using .ng-valid
and .ng-invalid
. I would expect angular-schema-form to manage these states correctly too.
Actual Behaviour
When using input validation with angular-schema-form, inputs appear to always be :valid
, even if a field is invalid.
To demonstrate, see the basic form on schemaform.io.
- Cause the validation on any of the fields to fail.
- Call
$('input:valid')
in the developer console. - Observe that the invalid (with
.ng-invalid
) is still returned.
Unfortunately this means that CSS frameworks that require :valid
, :invalid
states are not natively supported by angular-schema-form.
I am happy to tackle this issue if someone can point me in the right direction.
Thanks!