Skip to content

Instantly share code, notes, and snippets.

@mikeywaites
Created July 19, 2012 13:50
Show Gist options
  • Save mikeywaites/3144056 to your computer and use it in GitHub Desktop.
Save mikeywaites/3144056 to your computer and use it in GitHub Desktop.
var matchField = Class.create({
defaultMessage: '',
validate: function(val){
return true;
}
});
var alphaNumeric = Class.create({
defaultMessage: '',
validate: function(val){
return true;
}
});
var MyFrom = Form.create({
username: {required: true, max_length: 25},
password: {required: true, max_length: 32, validators: [validator.alphaNumeric(), validator.matchField(toField: 'some_field')]}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment