Skip to content

Instantly share code, notes, and snippets.

@chrsr
chrsr / validatejs-success.js
Created March 9, 2012 05:46
Successful validatejs example
validatejs = new FormValidator(form, rules, function(errors, events) {
if (errors.length > 0) {
// show errors
event.preventDefault(); // + ie6 equivalent
} else {
// do stuff before form submission
return true;
}
});
@chrsr
chrsr / validation.js
Created January 31, 2012 00:37
Inline validate.js usage
input.addEventListener('blur', function () {
var errors = document.getElementById("errors");
validator.validateField(this);
errors.innerHTML = validator.errors[0] || "";
});
@chrsr
chrsr / LICENSE.txt
Created October 19, 2011 02:52 — forked from p01/LICENSE.txt
Music SoftSynth
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE