Add some extensions methods for validation
Maybe an alias then?
That's an old discussion we have here. This library contains highly reusable code We can create a module with some CEs, but as you can see defining aliases are one-liner.
My original view was that F#+ is kind of a library for libraries, meaning that you can have your own enterprise specific libraries where you take what you need, the way you need, this is giving a specific name and closing it over certain type parameters.
I had feedback that some users did that at the beginning, which lead to the desire of making CEs more parameterizable, we did that in v1.2
However, if everybody is strongly for providing aliases we can evaluate the impact. Maybe provide a script with those aliases or a separate package.
There seems to be prior work that we can reuse some of the thoughts from. For dynamic languages we have:
https://clojure.org/about/spec https://github.com/jquense/yup
While for F# we have
https://github.com/lfr/FSharp.Domain.Validation https://github.com/JamesRandall/AccidentalFish.FSharp.Validation#built-in-validators
and the new library:
https://github.com/pimbrouwers/Validus#built-in-validators
Perhaps we can reuse some of the design work while being more in line with the vision that you promote in this PR (possible to write strictly typed validations instead of stringly typed validation keys/messages)?
Some of the operators seems to not have stabilised in Validus yet. The different libraries all have their built in validators that we can look at. Seems like there is some polymorphism going on for some of the validators.