Browse files

Expose the ‘addAttribute’ and the ‘addAttributeConstructor’ methods

  • Loading branch information...
1 parent 3db3d69 commit ea2e62d6f1d6b771fb2e23b773e2a9273ca9693a @Baggz committed Mar 9, 2012
Showing with 16 additions and 6 deletions.
  1. +16 −6 src/engines/json/outro.js
View
22 src/engines/json/outro.js
@@ -22,14 +22,24 @@
},
/**
- * AddValidator
+ * AddAttribute
*
- * @param {string} validatorName
- * @param {function} validatorFn
+ * @param {string} attributeName
+ * @param {function} attributeFn
*/
- addValidator: function(validatorName, validatorFn) {
- validators[validatorName] = validatorFn;
- }
+ addAttribute: function(attributeName, attributeFn) {
+ return Validation.prototype.addAttribute.apply(Validation, argument);
+ },
+
+ /**
+ * AddAttributeConstructor
+ *Constructor
+ * @param {string} attributeName
+ * @param {function} attributeConstructor
+ */
+ addAttributeConstructor: function(attributeName, attributeConstructor) {
+ return Validation.prototype.addAttributeConstructor.apply(Validation, argument);
+ },
};

0 comments on commit ea2e62d

Please sign in to comment.