#managing form validations

2 messages · Page 1 of 1 (latest)

pearl marlin
#

hi. i am doing form validations in the template @if (sometihng) {<mat-error>something</mat-error>} @else if etc... etc... with several custom validators for each form field.
This is getting lengthy for the template. Any advice on how to move this elsewhere?

steel marsh
#

You could build a custom form field component that handles all that error display problem.