How can I simplify form validation?

前端 未结 11 1462
[愿得一人]
[愿得一人] 2020-12-14 00:57

The code below seems to work pretty well for doing basic required form validation.

The form displays a red Name is required message when the field is dirty

11条回答
  •  囚心锁ツ
    2020-12-14 01:34

    Try this HTML:

    Your email is required.

    password should not match
    Accept only letters Accept only 50 characters
    Incorrect Format, should be MM/DD/YYYY

提交回复
热议问题