guillotinaweb / ngx-schema-form

HTML form generation based on JSON Schema
MIT License
485 stars 173 forks source link

has-error class should be only at form-group level #242

Open tdesvenain opened 6 years ago

tdesvenain commented 6 years ago

when a control is not valid, the formelement get has-error class

this is not what bootstrap expects: only form-group should have have-error class

now, when a single field has error, all form is under an .has-error class. and error style is applied on all widgets

AviFix commented 4 years ago

Same problem

Any solution?

WhileTrueEndWhile commented 4 years ago

I think the solution would be moving this code... https://github.com/guillotinaweb/ngx-schema-form/blob/master/projects/schema-form/src/lib/formelement.component.ts#L21 ...to each default widget in... https://github.com/guillotinaweb/ngx-schema-form/tree/master/projects/schema-form/src/lib/defaultwidgets