appleboy / CodeIgniter-reCAPTCHA

reCAPTCHA library for CodeIgniter
https://www.google.com/recaptcha/intro/index.html
BSD 3-Clause "New" or "Revised" License
106 stars 82 forks source link

How to use? #2

Closed DraugDev closed 8 years ago

DraugDev commented 9 years ago

Hello, how to use your library with form_validation?

Thanks!

DraugDev commented 9 years ago

I've got this one.

$this->form_validation->set_rules('g-recaptcha', 'Recaptcha', 'required' . $recaptcha = $this->input->post('g-recaptcha-response'));

Luckyfella73 commented 9 years ago

Have a look at the example: https://github.com/appleboy/CodeIgniter-reCAPTCHA/blob/master/example/controller/test.php

I would set up a custom callback function and add that to the validation rules.

DraugDev commented 9 years ago

Hay @Luckyfella73, thanks, ill try.