code: function Validator(store, rules, opts) {
    if (!(this instanceof Validator)) return new Validator(store, rules, opts);
  
    //校验参数
    if (!store || !rules) {
      throw new Error('store or rules can not empty!');
    }
  
    this.store = store;
    this.rules = rules;
    this.opts = opts || {};
    this.fieldErrors = Immutable.OrderedMap({});
  
    /**
     * 最小化暴露方法
     */
    return {
      isValid: this.isValid.bind(this),
      rule: this.rule.bind(this),
      clearError: this.clearError.bind(this),
      fieldErrors: function () {
        return this.fieldErrors.toJS();
      }.bind(this)
    }
  }
docs: 封装我们的Validator对象
  
  @param store 关联的store
  @param rules 关联的规则
  @param opts 可选的参数
  @constructor