nowjs-core
Version:
NowCanDo Javascript Core [nowjs-core] is a library written by TypeScript code maintains under Apache 2.0 licence
12 lines (11 loc) • 501 B
TypeScript
import { StringFormatType } from '../utils/index';
import { ValidationContext } from './ValidationContext';
export declare abstract class ValidatorBase {
private name;
private errorMessage;
constructor(name: string, errorMessage: StringFormatType);
get Name(): string;
get ErrorFormat(): string;
abstract validate<T, TValue>(context: ValidationContext<T, TValue>): Promise<boolean>;
protected formatErrorMessage<T, TValue>(context: ValidationContext<T, TValue>): string;
}