export declare enum ValidatorNames {
  max = "max",
  maxLength = "maxLength",
  min = "min",
  minLength = "minLength",
  pattern = "pattern",
  required = "required"
}
export interface Validator<T> {
  errorMessage?: string;
  validate: (x: T) => boolean;
}
export interface ValidatorEntry {
  name: string;
  options?: any;
}
/**  reducer callback: iterates through validators and returns the first one that fails it's validate function  */
export declare function combineValidators<A>(v1: Validator<A>, v2: Validator<A>): Validator<A>;
/** creates a list of ValidatorEntry objects from the ValidatorNames enum that exist on the component class
    example: [
      {name: 'required},
      {name: 'min', options: '5'}
    ]
  */
export declare function composeValidatorList(componentClass: any): Validator<any>;
export declare const defaultValidator: () => Validator<any>;
export declare const getValidator: (list: Array<ValidatorEntry>) => Validator<any>;
export declare const isRequiredValidator: () => Validator<HTMLInputElement>;
export declare const validatorFactory: (name: string) => Validator<HTMLInputElement>;
