The type of the data.
Chains a function that returns a Validation, enabling monadic composition.
For Passing
, applies the function; for Failing
, returns unchanged.
Function that takes a Passing
and returns a new Validation.
The Validation returned by fn
(for Passing
) or the same instance (for Failing
).
Combines this Validation with another, following semigroup rules.
Returns Passing
if both are Passing
, otherwise returns a Failing
with concatenated messages.
Another Validation to combine with.
A new Validation combining the states.
Matches the Validation state with a pattern, returning a value.
Enables declarative state handling, similar to a switch
statement.
Object with functions for each Validation state.
The result of the matching function.
Matches the Validation state with a partial pattern, performing side effects.
Partial object with functions for some Validation states.
Static
ofCreates a new Passing
Validation.
The validated value.
Represents a passing validation state with a value.