Best way to show error messages for angular reactive forms, one formcontrol multiple validation errors?

前端 未结 5 1343
春和景丽
春和景丽 2021-02-06 08:56

I am showing reactive form error messages as per the suggested approach of angular angular form validation error example.

html code of showing error on the page

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-06 09:42

    I would suggest to have a directive and component to show powerfully error message. component for each error message of form control and directive for add the component under the native element of form control. the full code can be found here

提交回复
热议问题