eddflrs/regulate-meteor — pull request #2 by epegzz (2013-04-24 00:09:46+00:00)
Title: add generic 'callback' validator

I added a generic callback validator.

The following example will only validate, if the entered value equals "foobar".
Of course, you can do a lot more complex stuff those callback functions.

```javascript
Regulate('demoForm', [
{ name: 'someField',
callback: function(value){
if (value == 'foobar'){
// this will pass
return true;
}else{
// any none true value will be displayed as error message
return 'The value must be "foobar", not "' + value + '"';
}
},
display_error: '#someFieldError'
},
]);