Open
Description
It would be really cool if I could provide the following method on my value type:
public bool IsValid(TValue value) => return some result;
And have the constructors and parsers throw an exception if the incoming value is not valid, if the above method exists on my struct id type.
For example, some of my string-based ids are just a hard-coded list of six values, like this (pardon me for using StronglyTypedId here haha), and when they arrive via rest request, after switching it to StructId, I'd like to validate that they are one of these particular values.
Metadata
Metadata
Assignees
Labels
No labels