Permalink
Browse files

Add a new method ‘addAttribute’

  • Loading branch information...
1 parent b335e0f commit 3db3d69e37fe4978d3fd2e4de2aa0e206f6f8602 @Baggz committed Mar 9, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/engines/json/addAttribute.js
@@ -0,0 +1,9 @@
+/**
+ * AddAttribute
+ *
+ * @param {string} attributeName
+ * @param {function} attributeFn
+ */
+Validation.prototype.addAttribute = function(attributeName, attributeFn) {
+ return Validation.prototype.attributes[attributeName] = attributeFn;
+};

0 comments on commit 3db3d69

Please sign in to comment.