ValidationRule
interface ValidationRule {
message: string;
type: 'required' | 'minLength' | 'maxLength' | 'pattern' | 'custom';
validator?: (value: unknown) => boolean;
value?: unknown;
}Source: Form.ts:17
Form field validation rule
Properties
message: string
Error message when validation fails
type: 'required' | 'minLength' | 'maxLength' | 'pattern' | 'custom'
Rule type
validator: (value: unknown) => boolean
Custom validation function (for 'custom' type)
value: unknown
Rule value (varies by type)