Skip to content

Correcting minLength and maxLength validation messages#61556

Merged
roblourens merged 1 commit intomicrosoft:masterfrom
medo64:master
Oct 23, 2018
Merged

Correcting minLength and maxLength validation messages#61556
roblourens merged 1 commit intomicrosoft:masterfrom
medo64:master

Conversation

@medo64
Copy link
Contributor

@medo64 medo64 commented Oct 23, 2018

If user violates minLength or maxLength configuration constraint, he receives slightly incorrect message. For example, for the following setting:

"type": "string",
"minLength": 4

message displayed if only 3 characters are entered would be:

Value must be more than 4 characters long.

This is incorrect as comparison is than with larger-then-or-equal operator. Correct message should be:

Value must be 4 or more characters long.

Same principle goes for maxLength.

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

@roblourens roblourens added this to the October 2018 milestone Oct 23, 2018
@roblourens roblourens merged commit d5d4f7e into microsoft:master Oct 23, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants