import * as valibot from "https://deno.land/x/valibot@v0.30.0/mod.ts";
Variables
[BIC] (https://en.wikipedia.org/wiki/ISO_9362) regex. | |
Brand symbol. | |
Cuid2 regex. | |
Decimal regex. | |
Email regex. | |
Emoji regex. | |
Hex color regex. | |
Hexadecimal regex. | |
IMEI regex. | |
IPv4 regex. | |
IPv6 regex. | |
ISO 8601 date regex. | |
ISO 8601 date-time regex. | |
ISO 8601 time regex. | |
ISO 8601 time with seconds regex. | |
ISO 8601 timestamp regex. | |
ISO 8601 week regex. | |
MAC 48 bit regex. | |
MAC 64 bit regex. | |
Octal regex. | |
ULID regex. | |
UUID regex. |
Functions
Returns the pipeline result object with issues. | |
Returns the pipeline action output. | |
f any | Creates an any schema. |
Creates an async any schema. | |
Creates a array schema. | |
Creates an async array schema. | |
f bic | Creates a pipeline validation action that validates a BIC. |
Creates a bigint schema. | |
Creates an async bigint schema. | |
f blob | Creates a blob schema. |
Creates an async blob schema. | |
Creates a boolean schema. | |
Creates an async boolean schema. | |
Brands the output type of a schema. | |
Creates a pipeline validation action that validates the bytes of a string. | |
Coerces the input of a schema to match the required type. | |
Coerces the input of a async schema to match the required type. | |
Creates a pipeline validation action that validates a credit card. | |
Creates a pipeline validation action that validates a Cuid2. | |
Creates a custom pipeline validation action. | |
Creates a async custom validation function. | |
f date | Creates a date schema. |
Creates an async date schema. | |
Creates a pipeline validation action that validates a decimal. | |
Returns message and pipe from dynamic arguments. | |
Deletes the global configuration. | |
Deletes a global error message. | |
Deletes a schema error message. | |
Deletes a specific error message. | |
Creates a pipeline validation action that validates an email. | |
Creates a pipeline validation action that validates an emoji. | |
Creates a pipeline validation action that validates the end of a string. | |
Creates an enum schema. | |
Creates an async enum schema. | |
Creates a pipeline validation action that validates the items of an array. | |
Creates a pipeline validation action that validates the content of a string or array. | |
Returns a fallback output value when validating the passed schema failed. | |
Returns a fallback output value when validating the passed schema failed. | |
Creates a pipeline validation action that validates whether a number is finite. | |
Flatten the error messages of a Vali error. | |
Forwards the issues of the passed validation action. | |
Forwards the issues of the passed validation action. | |
Returns the default value of the schema. | |
Returns the default value of the schema. | |
Returns the default values of the schema. | |
Returns the default values of the schema. | |
Returns the fallback value of the schema. | |
Returns the fallback value of the schema. | |
Returns the fallback values of the schema. | |
Returns the fallback values of the schema. | |
Returns the global configuration. | |
Returns a global error message. | |
Returns a schema error message. | |
Returns a specific error message. | |
f hash | Creates a pipeline validation action that validates a hash. |
Creates a pipeline validation action that validates a hexadecimal. | |
Creates a pipeline validation action that validates hex color. | |
f i18n | Creates the i18n error message. |
f imei | Creates a pipeline validation action that validates an IMEI. |
Creates a pipeline validation action that validates the content of a string or array. | |
Creates an instance schema. | |
Creates an async instance schema. | |
Creates a pipeline validation action that validates whether a number is an integer. | |
Creates an intersect schema. | |
Creates an async intersect schema. | |
f ip | |
f ipv4 | Creates a pipeline validation action that validates an IPv4 address. |
f ipv6 | Creates a pipeline validation action that validates an IPv6 address. |
f is | Checks if the input matches the scheme. By using a type predicate, this function can be used as a type guard. |
Checks whether a string with numbers corresponds to the luhn algorithm. | |
Creates a pipeline validation action that validates a date. | |
Creates a pipeline validation action that validates a datetime. | |
A generic type guard to check the type of an object. | |
Creates a pipeline validation action that validates a time. | |
Creates a pipeline validation action that validates a time with seconds. | |
Creates a pipeline validation action that validates a timestamp. | |
Creates a pipeline validation action that validates a week. | |
Creates a picklist schema of object keys. | |
f lazy | Creates a lazy schema. |
Creates an async lazy schema. | |
Creates a pipeline validation action that validates the length of a string or array. | |
Creates a literal schema. | |
Creates an async literal schema. | |
f mac | Creates a pipeline validation action that validates a MAC address. |
Creates a pipeline validation action that validates a 48-bit MAC address. | |
Creates a pipeline validation action that validates a 64-bit MAC address. | |
f map | Creates a map schema. |
Creates an async map schema. | |
Creates a pipeline validation action that validates the bytes of a string. | |
Creates a pipeline validation action that validates the length of a string or array. | |
Creates a pipeline validation action that validates the size of a map, set or blob. | |
Creates a pipeline validation action that validates the value of a string, number, boolean or date. | |
Merges the entries of multiple object schemas. Subsequent object entries overwrite the previous ones. | |
Merges the entries of multiple async object schemas. Subsequent object entries overwrite the previous ones. | |
Creates a pipeline validation action that validates the MIME type of a blob. | |
Creates a pipeline validation action that validates the bytes of a string. | |
Creates a pipeline validation action that validates the length of a string or array. | |
Creates a pipeline validation action that validates the size of a map, set or blob. | |
Creates a pipeline validation action that validates the value of a string, number or date. | |
Creates a pipeline validation action that validates whether a number is a multiple. | |
f nan | Creates a NaN schema. |
Creates an async NaN schema. | |
Creates a never schema. | |
Creates an async never schema. | |
Creates a non nullable schema. | |
Creates an async non nullable schema. | |
Creates a non nullish schema. | |
Creates an async non nullish schema. | |
Creates a non optional schema. | |
Creates an async non optional schema. | |
Creates a pipeline validation action that validates the bytes of a string. | |
Creates a pipeline validation action that validates the length of a string or array. | |
Creates a pipeline validation action that validates the size of a map, set or blob. | |
Creates a pipeline validation action that validates the value of a string or number. | |
Creates a null schema. | |
Creates a nullable schema. | |
Creates an async nullable schema. | |
Creates an async null schema. | |
Creates a nullish schema. | |
Creates an async nullish schema. | |
Creates a number schema. | |
Creates an async number schema. | |
Creates an object schema. | |
Creates an async object schema. | |
Creates a pipeline validation action that validates an octal. | |
f omit | Creates an object schema that contains not the selected keys of an existing schema. |
Creates an async object schema that contains only the selected keys of an existing schema. | |
Creates a optional schema. | |
Creates an async optional schema. | |
Parses an unknown input based on a schema. | |
Parses an unknown input based on a schema. | |
Creates an object schema consisting of all properties of an existing object schema set to optional. | |
Creates an async object schema consisting of all properties of an existing object schema set to optional. | |
f pick | Creates an object schema that contains only the selected keys of an existing schema. |
Creates an async object schema that contains only the selected keys of an existing schema. | |
Creates a picklist schema. | |
Creates an async picklist schema. | |
Executes the validation and transformation pipe. | |
Executes the async validation and transformation pipe. | |
Creates a record schema. | |
Creates an async record schema. | |
Creates a pipeline validation action that validates a string with a regex. | |
Creates an object schema consisting of all properties of an existing object schema set to non optional. | |
Creates an async object schema consisting of all properties of an existing object schema set to non optional. | |
Returns rest, error and pipe from dynamic arguments. | |
Creates a pipeline validation action that validates whether a number is a safe integer. | |
Parses an unknown input based on a schema. | |
Parses an unknown input based on a schema. | |
Returns the schema result object with issues. | |
Returns the schema result object. | |
f set | Creates a set schema. |
Creates an async set schema. | |
Sets the global configuration. | |
Sets a global error message. | |
Sets a schema error message. | |
Sets a specific error message. | |
f size | Creates a pipeline validation action that validates the size of a map, set or blob. |
f some | Creates a pipeline validation action that validates the items of an array. |
Creates a special schema. | |
Creates an async special schema. | |
Creates a pipeline validation action that validates the start of a string. | |
Creates a string schema. | |
Creates an async string schema. | |
Stringifies an unknown input to a literal or type string. | |
Creates a symbol schema. | |
Creates an async symbol schema. | |
Creates a custom pipeline transformation action. | |
Creates a async custom transformation function. | |
Creates a pipeline transformation action that converts all the alphabetic characters in a string to lowercase. | |
Creates a pipeline transformation action that sets a string, number or date to a maximum value. | |
Creates a pipeline transformation action that sets a string, number or date to a minimum value. | |
Creates a pipeline transformation action that removes the leading and trailing white space and line terminator characters from a string. | |
Creates a pipeline transformation action that removes the trailing white space and line terminator characters from a string. | |
Creates a pipeline transformation action that removes the leading white space and line terminator characters from a string. | |
Creates a pipeline transformation action that converts all the alphabetic characters in a string to uppercase. | |
Adds a transformation step to a schema, which is executed at the end of parsing and can change the output type. | |
Adds an async transformation step to a schema, which is executed at the end of parsing and can change the output type. | |
Creates a tuple schema. | |
Creates an async tuple schema. | |
f ulid | Creates a pipeline validation action that validates a ULID. |
Creates a undefined schema. | |
Creates an async undefined schema. | |
Creates a union schema. | |
Creates an async union schema. | |
Creates a unknown schema. | |
Creates an async unknown schema. | |
Unwraps the wrapped schema. | |
f url | Creates a pipeline validation action that validates a URL. |
f uuid | Creates a pipeline validation action that validates a UUID. |
Creates a pipeline validation action that validates the value of a string or number. | |
Creates a variant (aka discriminated union) schema. | |
Creates an async variant (aka discriminated union) schema. | |
Creates a void schema. | |
Creates an async void schema. |
Interfaces
Any schema type. | |
Any schema type. | |
Array path item type. | |
Array schema type. | |
Array schema async type. | |
Base schema type. | |
Base schema async type. | |
Base transformation type. | |
Base transformation async type. | |
Base validation type. | |
Base validation async type. | |
Bic validation type. | |
Bigint schema type. | |
Bigint schema async type. | |
Blob schema type. | |
Blob schema async type. | |
Boolean schema type. | |
Boolean schema async type. | |
Brand type. | |
Bytes validation type. | |
Credit card validation type. | |
Cuid2 validation type. | |
Custom validation type. | |
Custom validation async type. | |
Date schema type. | |
Date schema async type. | |
Decimal validation type. | |
Email validation type. | |
Emoji validation type. | |
Ends with validation type. | |
I Enum | Enum type. |
Native enum schema type. | |
Native enum schema async type. | |
Every validation type. | |
Excludes validation type. | |
Fallback info type. | |
Finite validation type. | |
Flat errors type. | |
Hash validation type. | |
Hexadecimal validation type. | |
Hex color validation type. | |
IMEI validation type. | |
Includes validation type. | |
Instance schema type. | |
Instance schema type. | |
Integer validation type. | |
Intersect schema type. | |
Intersect schema async type. | |
Invalid action result type. | |
IPv4 validation type. | |
IPv6 validation type. | |
IP validation type. | |
ISO date time validation type. | |
ISO date validation type. | |
ISO time second validation type. | |
ISO timestamp validation type. | |
ISO time validation type. | |
ISO week validation type. | |
Lazy schema type. | |
Lazy schema async type. | |
Length validation type. | |
Literal schema type. | |
Literal schema async type. | |
48-bit MAC validation type. | |
64-bit MAC validation type. | |
MAC validation type. | |
Map path item type. | |
Map schema type. | |
Map schema async type. | |
Max bytes validation type. | |
Max length validation type. | |
Max size validation type. | |
Max value validation type. | |
MIME type validation type. | |
Min bytes validation type. | |
Min length validation type. | |
Min size validation type. | |
Min value validation type. | |
Multiple of validation type. | |
NaN schema type. | |
NaN schema async type. | |
Never schema type. | |
Never schema async type. | |
Non nullable schema type. | |
Non nullable schema async type. | |
Non nullish schema type. | |
Non nullish schema async type. | |
Non optional schema type. | |
Non optional schema async type. | |
Not bytes validation type. | |
Not length validation type. | |
Not size validation type. | |
Not value validation type. | |
Nullable schema type. | |
Nullable schema async type. | |
Nullish schema type. | |
Nullish schema async type. | |
Null schema type. | |
Null schema async type. | |
Number schema type. | |
Number schema async type. | |
Object entries type. | |
Object entries async type. | |
Object path item type. | |
Object schema type. | |
Object schema async type. | |
Octal validation type. | |
Optional schema type. | |
Optional schema async type. | |
Picklist schema type. | |
Picklist schema async type. | |
Pipe action context type. | |
Pipe action issue type. | |
Record path item type. | |
Record schema type. | |
Record schema async type. | |
Regex validation type. | |
Safe integer validation type. | |
The schema config type. | |
Schema issue type. | |
Set path item type. | |
Set schema type. | |
Set schema async type. | |
Size validation type. | |
Some validation type. | |
Special schema type. | |
Special schema async type. | |
Starts with validation type. | |
String schema type. | |
String schema async type. | |
Symbol schema type. | |
Symbol schema async type. | |
To custom transformation type. | |
To custom transformation async type. | |
To lower case transformation type. | |
To max value transformation type. | |
To min value transformation type. | |
To trimmed end transformation type. | |
To trimmed start transformation type. | |
To trimmed transformation type. | |
To upper case transformation type. | |
Tuple path item type. | |
Tuple schema type. | |
Tuple schema async type. | |
Typed schema result type. | |
ULID validation type. | |
Undefined schema type. | |
Undefined schema async type. | |
Union schema type. | |
Union schema async type. | |
Unknown path item type. | |
Unknown schema type. | |
Unknown schema async type. | |
Untyped schema result type. | |
URL validation type. | |
UUID validation type. | |
Valid action result type. | |
Value validation type. | |
Variant schema type. | |
Variant schema async type. | |
Void schema type. | |
Void schema async type. |
Type Aliases
Brand name type. | |
Class type. | |
Default type. | |
Default async type. | |
Default value inference type. | |
Default values inference type. | |
Error message type. | |
Fallback type. | |
Fallback async type. | |
Fallback value inference type. | |
Fallback values inference type. | |
The global config type. | |
Hash type type. | |
Input inference type. | |
Intersect options type. | |
Intersect options async type. | |
Issue path type. | |
Issue reason type. | |
Literal type. | |
Map input inference type. | |
Map output inference type. | |
Maybe promise type. | |
Maybe readonly type. | |
Non nullable input inference type. | |
Non nullable output inference type. | |
Non nullish input inference type. | |
Non nullish output inference type. | |
Non optional input inference type. | |
Non optional output inference type. | |
Object input inference type. | |
Object keys type. | |
Object output inference type. | |
Output inference type. | |
Partial object entries type. | |
Partial object entries async type. | |
Path item type. | |
Path list type. | |
Picklist options type. | |
T Pipe | Pipe type. |
Pipe action issues type. | |
Pipe action result type. | |
Pipe async type. | |
Record input inference type. | |
Record key type. | |
Record key async type. | |
Record output inference type. | |
Resolve object type. | |
Safe parse result type. | |
Schema issues type. | |
Schema result type. | |
Schema with brand type. | |
Schema with fallback type. | |
Schema with fallback async type. | |
Schema with maybe default type. | |
Schema with maybe default async type. | |
Schema with maybe fallback type. | |
Schema with maybe fallback async type. | |
Schema with transform type. | |
Schema with transform async type. | |
Set output inference type. | |
Set output inference type. | |
Tuple input inference type. | |
Tuple shape type. | |
Tuple shape async type. | |
Tuple with rest output inference type. | |
Union options type. | |
Union options async type. | |
Variant option type. | |
Variant option async type. | |
Variant options type. | |
Variant options async type. |