[MinLength(6)]
public string Foo { get; set; }
If the value for this field is an empty string the web api model validator adds an error: "Foo must be a string or array type with a minimum length of 6"
Shouldn't an empty string be treated the same as null?
If I wanted a validation error for empty string I would add a [Required] validator.
public string Foo { get; set; }
If the value for this field is an empty string the web api model validator adds an error: "Foo must be a string or array type with a minimum length of 6"
Shouldn't an empty string be treated the same as null?
If I wanted a validation error for empty string I would add a [Required] validator.