Closed abarghoud closed 5 months ago
When implementing a custom widget I realised that the value of errors property which is part of control property is an array of errors as we can see here https://github.com/guillotinaweb/ngx-schema-form/blob/master/projects/schema-form/src/lib/widget.ts#L29.
errors property
Knowing that the type of FormControl.errors is "ValidationErrors | null", so it should.
This leads to have some errors when trying to treat control.errors as an array as its type is an object.
Hello @ebrehault, any thouhgts concerning this bug ? If you agree I could submit a PR, but it would introduce a breaking change
Due to inactivity concerning this issue, I am willing to close it
When implementing a custom widget I realised that the value of
errors property
which is part of control property is an array of errors as we can see here https://github.com/guillotinaweb/ngx-schema-form/blob/master/projects/schema-form/src/lib/widget.ts#L29.Knowing that the type of FormControl.errors is "ValidationErrors | null", so it should.
This leads to have some errors when trying to treat control.errors as an array as its type is an object.