Safari is not acknowledging the “required” attribute. How to fix it?

前端 未结 3 2021
不知归路
不知归路 2020-12-16 14:51
3条回答
  •  不知归路
    2020-12-16 15:14

    Currently, Safari doesn’t yet emit any error messages for required values in form fields that the user has not provided (nor for invalid values the user has put into form fields). But you can enable it by using hacks or a polyfill. See HTML5 Form Validation Fallback (without a library) for a lightweight hack that enables it, and see h5Validate for a jQuery-based polyfill plugin.

提交回复
热议问题