UNPKG

@react-input-validator/rules

Version:

The validation rule objects used by the packages: `@react-input-validator/core`, `@react-input-validator/native` and `@react-input-validator/web`

11 lines 570 B
import type { IRule, Nullable, ValidateFunctionAsync } from './Rule'; import ValidationRuleAsync from './ValidationRuleAsync'; export declare class CustomRuleAsync<V = any> extends ValidationRuleAsync<V> { #private; constructor(validateFunc: ValidateFunctionAsync<V>, errorMessage?: string); get errorMessage(): Nullable<string>; get resultValue(): any; validate(): Promise<IRule<V>>; } export declare const ruleAsync: <V = unknown>(validateFunc: ValidateFunctionAsync<V>, errorMessage?: string) => IRule<V>; //# sourceMappingURL=customAsync.d.ts.map