FSharp.Domain.Validation icon indicating copy to clipboard operation
FSharp.Domain.Validation copied to clipboard

Replace validate with parse

Open lfr opened this issue 4 years ago • 1 comments

I don't use this library (yet), but one thing that struck me when reading the readme is that this library isn't about validation, it's about parsing. See Parse, don't validate. If the API is about to be changed anyway, I suggest changing "validate" to "parse".

Strictly speaking, the ITextBlock.Validate method actually performs validation, not parsing. But stuff like Block.validate should be called Block.parse.


From @cmeeren #5

lfr avatar Feb 02 '21 12:02 lfr

Hello, As a new user of your library (actually testing it if it fits my needs), I really think that "Parsing" reflects more what I'm doing than "Validating".

This is especially true on the domain level when converting a DTO to a model. Actually I'd also like to make modifications as well, e.g. triming a string when it's too long (rather than just validating it).

ericdes avatar Apr 09 '21 10:04 ericdes