Skip to content
Captcha module port from kohana v2
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Initialize in your controller

public function action_signup()
    $captcha = new Captcha; // Or new Captcha('alpha'), new Captcha('math'), ...

Render captcha field in your view

<label for="captcha"><?php echo $captcha; ?></label>
<br />
<input id="captcha" name="captcha" dir="ltr" title="Key in the charaters or answer the question above" type="text">

Validate captcha

$valid = new Validate($_POST);

$valid->filter(TRUE, 'trim')
    ->rule('captcha', 'not_empty')
    ->rule('captcha', 'Captcha::valid');

Want more detail ?

Captcha docs from

Something went wrong with that request. Please try again.