Adds logic to a field to determine if the field has validation errors.
API
function validate<TValue, TPathKind extends PathKind = PathKind.Root>(
path: FieldPath<TValue, TPathKind>,
logic: NoInfer<FieldValidator<TValue, TPathKind>>,
): void;validate
voidAdds logic to a field to determine if the field has validation errors.
@paramlogic
NoInfer<FieldValidator<TValue, TPathKind>>A Validator that returns the current validation errors.
@returns
voidJump to details