示例#1
0
  validateField(field, value) {
    const validationField = {};
    validationField[field] = value;

    const validationRule = this.ruleForField(field);
    const error = validate.validate(validationField, validationRule);

    this.reconcileErrors(field, error);
    return error;
  }
示例#2
0
 validateAll(values) {
   this.errors = validate.validate(values, this.schema);
   return this.errors;
 }