Thorsday

Thorsday Research Project

Webcommgard: Subduing Loki's Web Mischief


jQuery Validator

If you would like more information or have a question, let us know:

Pretty fancy.

Files Needed

jquery.validate.js, validator.css

Inline Code

In the head:


<script type="text/javascript">
$().ready(function() {
	// validate signup form on keyup and submit
	$("#contact").validate({
		rules: {
			name: "required",
			email: "required",
			message: "required"
			},
		messages: {
			name: "You forgot your name, didn't you?",
			email: "Do you even have email?",
			message: "Is this the first time you filled out a form?"
			}
	});
	
});
</script>

		

In the body:

<form action="http://www.isu.edu/" method="post" id="contact">
<fieldset>
	<legend>If you would like more information or have a question, let us know:</legend>
	<ul>
		<li><label for="name">Name</label> <input type="text" name="name" id="name" /></li>
		<li><label for="email">Email</label> <input type="text" name="email" id="email" /></li>
		<li><label for="message">Message</label> <textarea name="message" id="message" rows="4" cols="30"></textarea></li>
	</ul>
	<input type="submit" value="Send it, jerk" />
</fieldset>
</form>

		

Special Considerations

Implementation

http://www.isu.edu/urelate/media/press-general.shtml

Source

http://bassistance.de/jquery-plugins/jquery-plugin-validation/