-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hi,
I'm trying to automatically map protobuf types to refined types. Is it possible to do so in a safe way that would allow for easy error handling (i.e., as opposed to throwing)?
For example, Validator[MyType].validate(request) returns a list of failures when validate_at_construction is set to false. I would like similar behavior for type mappers.
One workaround I can think of is to avoid type mapping and instead just use the Validator instance, then perform unsafe operations (NonEmptyString.unsafeFrom), assuming the data has already been validated based on the appropriate rules.
Thank you,
Chad Daksha
Metadata
Metadata
Assignees
Labels
No labels