@blinkk/selective-edit
Version:
Selective structured text editor.
19 lines (18 loc) • 585 B
TypeScript
import { MinMaxRuleConfig, Rule, RuleConfig } from '../validationRules';
export interface LengthRuleConfig extends RuleConfig {
max?: MinMaxRuleConfig;
min?: MinMaxRuleConfig;
}
export declare class LengthRule extends Rule {
config: LengthRuleConfig;
defaultMessage: string;
constructor(config: LengthRuleConfig);
allowAdd(value: any): boolean;
allowRemove(value: any): boolean;
private cleanValue;
/**
* Field is considered required when there is a min value..
*/
get isRequired(): boolean;
validate(value: any): string | null;
}