UNPKG

@blinkk/selective-edit

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