ng-turkey / ngx-validate

Dynamic reactive forms validation for Angular 5+
https://ng-turkey.github.io/ngx-validate/
MIT License
71 stars 8 forks source link

Feat: support form @angular/material form field errors #52

Closed badre429 closed 3 years ago

badre429 commented 4 years ago

Angular material form field generate div wrapper for the input and the validation error component must be in other div there for then selection of validation component location must be function in config

this is as live demo

armanozak commented 3 years ago

Hi @badre429,

Thank you very much for your contribution. The library is still evolving and your point is valid. We will take this as a feature and implement it before v1.

Have a nice day.

rqx110 commented 3 years ago

also consider other ui framework. eg: ng-zorro-antd

mikkelalstrup commented 3 years ago

Hi @armanozak , Do you have any update on when this is going to be implemented? This is relevant for our project atm.

Have a nice day!

armanozak commented 3 years ago

Hi @badre429, @rqx110, and @mikkelalstrup,

We have developed a solution for Material and have just published v0.1.0 to npm. Please check the example:

https://stackblitz.com/edit/ngx-validate-1niswy?file=src%2Fapp%2Fcomponents%2Fapp.component.html

We have introduced a new directive called ValidationContainerDirective (with [validationContainer] selector). Now you can use this new directive to get a ValidationTargetDirective which is not a parent of the form control. This should also be working in other UI libraries.

Please try the new feature and let us know if it works as expected.

Have a nice day.

badre429 commented 3 years ago

@armanozak thanks for you valuable work this library save as huge amount of time