How to display only single validation error at a time

后端 未结 6 1767
失恋的感觉
失恋的感觉 2021-02-08 02:35

I have this code to which displaying errors on my form


&         


        
6条回答
  •  太阳男子
    2021-02-08 02:58

    This works and you don't have to hardcode the validations in you template like @Joes answer above.

    Template:
        
              
    {{validation.message}}
    CSS: .validation-container div { display: none; } .validation-container div:first-child { display: block; }

提交回复
热议问题