This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Schema generation does not apply MinLength to property marked with RequiredAttribute.

description

The RequiredAttribute has properties that allow the programmer to control AllowEmptyStrings.

AllowEmptyStrings is false by default, and when false it should be treated as if the MinLength attribute was specified with a value of 1.

For example:
    [Required]
    [MaxLength(2000)]
    public string Value { get; set; }
Should yield a MinLength of 1 in validation.

comments