How can I use HTML5 Validation with React?

前端 未结 3 646

This is my React Render Block. I am using HTML5 Validation here, using required. This things supposed to work fine. But it is not working. can anyone suggest me how to use

3条回答
  •  再見小時候
    2021-01-08 00:54

    you need to probably enclose everything in a form, only then the html5 validations are done.

    Something like this should help

提交回复
热议问题