@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`
20 lines • 679 B
TypeScript
import { type ValidateParam } from './Rule';
import ValidationRule from './ValidationRule';
type IfFunc = (value: unknown, param: Omit<ValidateParam, 'resultValue'>) => boolean;
export declare class Required extends ValidationRule<any> {
#private;
constructor(_if?: IfFunc);
static If(_if: IfFunc): Required;
get priority(): number;
get errorMessage(): string;
get resultValue(): any;
notTrimmed(): this;
validate(): this;
}
declare class RequiredIf extends Required {
if: ((ifFunc: IfFunc) => Required);
}
export declare const required: RequiredIf;
export declare const alwaysValid: Required;
export {};
//# sourceMappingURL=required.d.ts.map