@blinkk/selective-edit
Version:
Selective structured text editor.
19 lines (18 loc) • 581 B
TypeScript
import { MinMaxRuleConfig, Rule, RuleConfig } from '../validationRules';
export interface RangeRuleConfig extends RuleConfig {
max?: MinMaxRuleConfig;
min?: MinMaxRuleConfig;
}
export declare class RangeRule extends Rule {
config: RangeRuleConfig;
defaultMessage: string;
constructor(config: RangeRuleConfig);
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;
}