UNPKG

@blinkk/selective-edit

Version:
19 lines (18 loc) 581 B
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; }