What is the best solution for protection frontend form of spam, before insert data in database, random addition two number or any captcha?
Any simple solution?
What is the best solution for protection frontend form of spam, before insert data in database, random addition two number or any captcha?
Any simple solution?
I am not sure how you are setting up your form however you should be able to do client side validation and server side validation. If the client side validation is not passed then Do not let the user submit.
Client side validation should always be followed by server side validation. In your controller or whatever process you are using to handle your form submission you can validate the data again. Use regular expression to validate phone numbers, email addresses, names whatever you wish to validate. Check that all required fields in fact contain data etc.