import type { ActionFieldDef, FieldValidation } from './types'; import type { FieldIssue } from './server-error'; export interface ValidationSpec { required?: boolean; type?: string; regex?: string; min?: number; max?: number; custom?: string; options?: string[]; } /** Parse `required|min:2|email` or `required,min=2,max=100` or a custom slug. */ export declare function parseRuleString(s: string): ValidationSpec; /** Normalize ActionFieldDef.validation (object, laravel string, or `rules`). */ export declare function fieldValidationOf(field: ActionFieldDef | Record): FieldValidation; /** Evaluate spec against one value; collect every issue (not fail-fast). */ export declare function checkValue(value: unknown, spec: ValidationSpec): FieldIssue[]; /** Validate a form payload the way Laravel's Validator does: collect every * field issue, dotted keys for line-items (`items.0.qty`). */ export declare function validateValues(fields: readonly ActionFieldDef[], values: Record): Record; export declare function bagHasErrors(bag: Record): boolean; //# sourceMappingURL=validator.d.ts.map