phantom-types
phantom-types copied to clipboard
Document ability to override `parse` method
I ried to find if it's currently possible in docs and on the web, but to no avail. Apologies if I'm missing something. If it's not implemented already, can we have the possibility to customize the parsing logic. My use case is to implement NonBlankString (similar to NonEmptyStr but before validation, strips the string value first). Thanks.
@akefirad This is just a matter of overriding the parse method in a subclass, but I see your point this could be explicitly documented. Let's keep this issue open to track that.