code: function () {
    this._segments = {};
    this._elements = {};
    this._formats = {};
    this._counts = {
      segment: 0,
      element: 0,
      component: 0
    };
    this._state = Validator.states.all;
  }
docs: The `Validator` can be used as an add-on to `Parser` class, to enable
  validation of segments, elements and components. This class implements a
  tolerant validator, only segments and elemens for which definitions are
  provided will be validated. Other segments or elements will pass through
  untouched. Validation includes:
  * Checking data element counts, including mandatory elements.
  * Checking component counts, including mandatory components.
  * Checking components against they're required format.