# rsvp/1.3.0/jquery-validate/demo/captcha/captcha.js

RSVP and Event Management, version 1.3.0. 28 lines.

- Page: https://pluginprobe.com/plugins/rsvp/1.3.0/code/jquery-validate/demo/captcha/captcha.js
- Raw: https://pluginprobe.com/plugins/rsvp/1.3.0/raw/jquery-validate/demo/captcha/captcha.js
- Modified: 2011-05-27T15:54:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/rsvp/1.3.0/code/jquery-validate/demo/captcha/captcha.js#L10-L20`.

```javascript
$(function(){
	$("#refreshimg").click(function(){
		$.post('newsession.php');
		$("#captchaimage").load('image_req.php');
		return false;
	});
	
	$("#captchaform").validate({
		rules: {
			captcha: {
				required: true,
				remote: "process.php"
			}
		},
		messages: {
			captcha: "Correct captcha is required. Click the captcha to generate a new one"	
		},
		submitHandler: function() {
			alert("Correct captcha!");
		},
		success: function(label) {
			label.addClass("valid").text("Valid captcha!")
		},
		onkeyup: false
	});
	
});

```
