nullable()
nullable<
T>(schema,message?):NullableSchema<Schema<T>>
Makes a schema nullable (accepts null).
Type Parametersโ
T: Tโ
Parametersโ
schema: Schema<T>โ
The schema to make nullable
message?: stringโ
Custom error message
Returns: NullableSchema<Schema<T>>โ
Schema that accepts the original type or null
Sinceโ
2.0.0