Skip to content

Instantly share code, notes, and snippets.

@cramforce
Created April 29, 2010 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cramforce/383653 to your computer and use it in GitHub Desktop.
Save cramforce/383653 to your computer and use it in GitHub Desktop.
Module("gc.srv.bo.customer", function (m) {
Class("Address", {
isa: gc.srv.bo.BusinessObject,
does: gc.srv.bo.GenericDecorator,
validations: {
firstName: {
simple: ["required"]
},
lastName: {
simple: ["required"]
},
postalCode: {
simple: ["required", function () {
return "postalCode"+gc.srv.bo.country.current().ID.toUpperCase();
}]
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment