UNPKG

amis-model-design

Version:

amis模型设计器

17 lines (16 loc) 719 B
type RuleType = 'isRequired' | 'isEmail' | 'isUrl' | 'isInt' | 'isAlpha' | 'isNumeric' | 'isAlphanumeric' | 'isFloat' | 'isWords' | 'isUrlPath' | 'matchRegexp' | 'minLength' | 'maxLength' | 'maximum' | 'minimum' | 'isJson' | 'isLength' | 'notEmptyString' | 'equalsField' | 'equals'; export interface RuleConfig { type: RuleType; label: string; scaffold?: any; controls?: Array<any>; } export interface ValidationRule { type: RuleType; options: any; message: string; } export declare function addRuleConfig(config: RuleConfig): void; export declare function getConfigFields(): RuleConfig[]; export declare function resolveConfigByType(type: string): RuleConfig | null | undefined; export {};