Hi, How can I validate captcha using javascript to validate form fields as well

64 views
Skip to first unread message

Dieter Munnik

unread,
Jun 14, 2016, 5:41:48 AM6/14/16
to reCAPTCHA
Hi,

I'm using a php form. 
I want to validate my form fields values using javascript and at the same time validate recaptcha repsonse ?

How can this be done ?

Seth Munroe

unread,
Jun 14, 2016, 12:43:26 PM6/14/16
to reCAPTCHA
You shouldn't validate reCAPTCHA on the client side. You need to check that reCAPTCHA was accepted from server code. The reason for this is that you have no control over the scripting that the user actually runs. The user can do anything to send the data your server is expecting without running any of the client side code you sent out for them to run.

Googling for reCAPTCHA validation PHP turned up this fairly short example:

-Seth
Reply all
Reply to author
Forward
0 new messages