How to make ngMessage for required fields only show when dirty or submitting a form?

前端 未结 12 2594
一个人的身影
一个人的身影 2020-12-08 02:31

I\'m using AngularJS 1.3.0 RC0 and angular-messages. ng-messages dutifully shows error messages for those \"required\" fields when a form is initially loaded and pristine. S

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 02:42

         
    

    Required

    not a valid field. Length exceeds.

    not a valid field. Length is shorter.

    button type should be submit and this will work.

提交回复
热议问题