Asserts that the provided Luxon value is valid.
This function checks whether a Luxon date, duration, or interval is valid. If the value is invalid, it throws an error with details from the value's invalidReason and invalidExplanation properties.
invalidReason
invalidExplanation
The Luxon object to validate.
Optional custom header for the error message.
If the provided value is invalid.
Optional
Asserts that the provided Luxon value is valid.
This function checks whether a Luxon date, duration, or interval is valid. If the value is invalid, it throws an error with details from the value's
invalidReason
andinvalidExplanation
properties.Param: value
The Luxon object to validate.
Param: message
Optional custom header for the error message.
Throws
If the provided value is invalid.