guillotinaweb / ngx-schema-form

HTML form generation based on JSON Schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Form control errors value is an array of errors

abarghoud opened this issue · comments

commented

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.

commented

Hello @ebrehault, any thouhgts concerning this bug ? If you agree I could submit a PR, but it would introduce a breaking change

commented

Due to inactivity concerning this issue, I am willing to close it