Batch validate multiple values with different schemas
Array of validation configurations
array of validated values
Create a validation function from a Zod schema
Zod schema
Name of the field for error messages
validation function
Safely validate data and return result with success/error information
Zod schema to validate against
Data to validate
Optional
context: ErrorContextAdditional error context
validation result
Validate enum value
Value to validate
Array of allowed values
Name of the field being validated
Optional
context: ErrorContextAdditional error context
validated value
Validate string format using regex
String to validate
Regex pattern
Name of the field being validated
Description of expected format
Optional
context: ErrorContextAdditional error context
validated string
Validate required field
Value to validate
Name of the field being validated
Optional
context: ErrorContextAdditional error context
validated value
Static
validateValidate data against a Zod schema with proper error handling
Zod schema to validate against
Data to validate
Optional
context: ErrorContextAdditional error context
validated data
Static
validateValidate object with multiple properties
Object to validate
Validation configurations for each property
Optional
context: ErrorContextAdditional error context
validated object
Validation helper utilities for type-safe validation with error handling