How do I verify age using jQuery?

后端 未结 8 2025
故里飘歌
故里飘歌 2020-12-04 04:28

I need to validate if the age for a alcohol website. And what I need is all here. I\'m nearly there but I\'m not sure is correct . Locally doesn\'t work. I need the

相关标签:
8条回答
  • 2020-12-04 05:07

    How about you just ask them - "Are you at least XX years old?" Asking for a birth date isn't more secure - if they'll want to lie, they'll enter a wrong date anyway.

    0 讨论(0)
  • 2020-12-04 05:07

    Validating via JavaScript is fallible. What if the user turns JavaScript off? From a legal point of view, you should probably do this server-side. If they lie about their age, then the legal responsibility probably lies with them, but if you don't validate their age (because they have turned JavaScript off) then you are at fault.

    0 讨论(0)
提交回复
热议问题