Whitelists a value
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Returns a new type that is the result of adding the rules of one type to another.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Sets a default value if the original value is undefined.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Annotates the key
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Annotates the key with an example value, must be valid.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Marks a key as forbidden which will not allow any value except undefined. Used to explicitly forbid keys.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Blacklists a value
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Specifies the exact length of the buffer:
Specifies the maximum length of the buffer.
Attaches metadata to the key.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Specifies the minimum length of the buffer.
Annotates the key
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Marks a key as optional which will allow undefined as values. Used to annotate the schema for readability as all keys are optional by default.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Overrides the global validate() options for the current key and any sub-key.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Marks a key as required which will not allow undefined as value. All keys are optional by default.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Sets the options.convert options to false which prevent type casting for the current key and any child keys.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Annotates the key
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Annotates the key with an unit name.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Adds the provided values into the allowed whitelist and marks them as the only valid values allowed.
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
T in 'joi'.AnySchema<T extends AnySchema<Schema>>
Converts the type into an alternatives type where the conditions are merged into the type definition where: