@blinkk/selective-edit
Version:
Selective structured text editor.
14 lines (13 loc) • 468 B
TypeScript
import { AllowExcludeRuleConfig, Rule, RuleConfig } from '../validationRules';
export interface MatchRuleConfig extends RuleConfig {
allowed?: AllowExcludeRuleConfig;
excluded?: AllowExcludeRuleConfig;
}
export declare class MatchRule extends Rule {
config: MatchRuleConfig;
defaultMessage: string;
patternCache: Record<string, RegExp>;
constructor(config: MatchRuleConfig);
private cachePattern;
validate(value: any): string | null;
}