How to use HTML5 to validate a date range?

前端 未结 5 1049
清酒与你
清酒与你 2021-01-12 17:15

Alternatively, is it possible to validate against another field\'s value with html5?

A common example would be selecting a date range where \"from\" date sh

5条回答
  •  情深已故
    2021-01-12 17:56

    If you want to avoid issues with someone hacking / crashing yor site - validate input data with:

    • (optional) javascript before sending a form (protects against malforming data using javascript, inputting incorrect one, reduces traffic)
    • (mandatory) on server side (protects against more clever guys that might malform input data using fiddler for example)

    This is the only (at least second point) approach that protects you and your site.

提交回复
热议问题