MinLength and MaxLength validate inclusive bounds, but their default messages describe exclusive bounds.
MinLength(8) accepts a value whose length is exactly 8, while its message says the property must be more than 8 characters.
MaxLength(50) accepts a value whose length is exactly 50, while its message says the property must be less than 50 characters.
Expected: change the default localization entries to say at least / at most, or otherwise state inclusive bounds, and update tests for the boundary values and rendered messages.
Found while addressing review feedback on the documentation-site rewrite.
MinLengthandMaxLengthvalidate inclusive bounds, but their default messages describe exclusive bounds.MinLength(8)accepts a value whose length is exactly 8, while its message says the property must be more than 8 characters.MaxLength(50)accepts a value whose length is exactly 50, while its message says the property must be less than 50 characters.Expected: change the default localization entries to say at least / at most, or otherwise state inclusive bounds, and update tests for the boundary values and rendered messages.
Found while addressing review feedback on the documentation-site rewrite.