0
comment
comment
on 1/27/2020 11:21 PM
In order to give a nicer developer experience composing validation messages there are broad categories of libraries that either work well in a Java/C# style setting or work well when composing functions.
Attribute based validation libraries
The default style that can be seen in many java and C# projects is the attribute based validation approach.
public class Person
{
[MinLength(1,ErrorMessage ="NameBetween1And50"), MaxLength(50,ErrorMessage ="NameBetween1And50")]
public string Name{get;set;}
[Ema[...]