Skip to content
This repository
Browse code

Expose the ‘addAttribute’ and the ‘addAttributeConstructor’ methods

  • Loading branch information...
commit ea2e62d6f1d6b771fb2e23b773e2a9273ca9693a 1 parent 3db3d69
František Hába authored

Showing 1 changed file with 16 additions and 6 deletions. Show diff stats Hide diff stats

  1. +16 6 src/engines/json/outro.js
22 src/engines/json/outro.js
@@ -22,14 +22,24 @@
22 22 },
23 23
24 24 /**
25   - * AddValidator
  25 + * AddAttribute
26 26 *
27   - * @param {string} validatorName
28   - * @param {function} validatorFn
  27 + * @param {string} attributeName
  28 + * @param {function} attributeFn
29 29 */
30   - addValidator: function(validatorName, validatorFn) {
31   - validators[validatorName] = validatorFn;
32   - }
  30 + addAttribute: function(attributeName, attributeFn) {
  31 + return Validation.prototype.addAttribute.apply(Validation, argument);
  32 + },
  33 +
  34 + /**
  35 + * AddAttributeConstructor
  36 + *Constructor
  37 + * @param {string} attributeName
  38 + * @param {function} attributeConstructor
  39 + */
  40 + addAttributeConstructor: function(attributeName, attributeConstructor) {
  41 + return Validation.prototype.addAttributeConstructor.apply(Validation, argument);
  42 + },
33 43
34 44 };
35 45

0 comments on commit ea2e62d

Please sign in to comment.
Something went wrong with that request. Please try again.