Skip to content

MinLength and MaxLength default messages describe exclusive bounds #296

Description

@dukesteen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions