ThrivingKings/Apprise — pull request #11 by danieldbower (2012-01-24 16:23:35+00:00)
Title: Simple Validation added

Incredibly basic validation added.
Warnings: I've not done much javascript or jquery, so this is likely not idiomatic.
Also, my styling choices are not going to impress anyone.

Usage:

apprise("What's your name?", {
'input':'test',
'validation':function(value){
//return the string 'true' if the value is valid
if(value=='test'){
return 'true';
//otherwise, return an error message
}else{
return 'type "test" in the box';
}
}},
function(value){
alert("Pleased to meet you " + value);
}
);