Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created May 25, 2012 14:37
Show Gist options
  • Save eduardolundgren/2788472 to your computer and use it in GitHub Desktop.
Save eduardolundgren/2788472 to your computer and use it in GitHub Desktop.
A.mix(
YUI.AUI.defaults.FormValidator.STRINGS,
{
customRule: 'Type the number 55.',
anotherRule: 'Message for another rule'
},
true
);
A.mix(
YUI.AUI.defaults.FormValidator.RULES,
{
customRule: function(val, fieldNode, ruleValue) {
return (val == 55);
},
anotherRule: function(val, fieldNode, ruleValue) {
return (val == 'another');
}
},
true
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment