How to test if a string contains gibberish in PHP?

前端 未结 2 1088
萌比男神i
萌比男神i 2021-01-02 10:38

I am making a registering form for a website and because I\'m sure everyone is going to enter some gibberish in the Secret Answer\'s input (I do that myself), I would like t

2条回答
  •  猫巷女王i
    2021-01-02 11:16

    Make the user retype the secret answer one more time (as when you set new passwords). Also hide the typed-in-text as with passwords [input type = "password"]. This will make it impossible for them to copy the answer and paste in the retype field. So their best way out is to use a secret answer that makes sense to them.

    I don't think any algorithmic way of checking for gibberish would be very accurate, because 'gibberish' is relative :)

提交回复
热议问题