You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
This library looks very interesting! But with exceptions generally being sophisticated GOTO statements, using them for validations feels very wrong. Especially since validation failure is not really an exception at all: it is expected to happen on a regular basis and part of the regular business process.
Describe the solution you'd like
I'd like an API that returns some kind of ValidationResult object which can be either "OK" or "Failed" and which contains all the information about the failure(s), including error messages and failed values.
Personally I really like the API of Kalidation which uses arrow.core.Validated (to be replaced with a regular Either in upcoming Arrow releases) - although in turn its many dependencies give it a much bigger footprint than Valiktor.
Describe alternatives you've considered
I was thinking about creating a wrapper method that catches the exception and encapsulates the information in a validation result object. Looking at #75 I'm not sure that it would be possible to get all the information from the exception, though.
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
This library looks very interesting! But with exceptions generally being sophisticated GOTO statements, using them for validations feels very wrong. Especially since validation failure is not really an exception at all: it is expected to happen on a regular basis and part of the regular business process.
Describe the solution you'd like
I'd like an API that returns some kind of ValidationResult object which can be either "OK" or "Failed" and which contains all the information about the failure(s), including error messages and failed values.
Personally I really like the API of Kalidation which uses
arrow.core.Validated
(to be replaced with a regularEither
in upcoming Arrow releases) - although in turn its many dependencies give it a much bigger footprint than Valiktor.Describe alternatives you've considered
I was thinking about creating a wrapper method that catches the exception and encapsulates the information in a validation result object. Looking at #75 I'm not sure that it would be possible to get all the information from the exception, though.
Additional context
The text was updated successfully, but these errors were encountered: