Validator[T: T]¶
Interface validators must implement.
We strongly suggest you use a primitive
for your Validator
as validators
are required to be stateless.
Constructors¶
create¶
Returns¶
- Validator[T] val^
Public Functions¶
apply¶
Takes an instance and returns either ValidationSuccess
if it meets the
constraint criteria or ValidationFailure
if it doesn't.
Parameters¶
- i: T
Returns¶
- (ValidationSuccess val | ValidationFailure val)