Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Integer Maximum constraint validation message is not correct #125

Closed
sidux opened this issue May 11, 2021 · 3 comments · Fixed by #126
Closed

Type Integer Maximum constraint validation message is not correct #125

sidux opened this issue May 11, 2021 · 3 comments · Fixed by #126

Comments

@sidux
Copy link
Contributor

sidux commented May 11, 2021

number:
  type: integer
  minimum: 1
  maximum: 2147483648
  exclusiveMaximum: true

When number is equal to 2147483648, I get this validation message:

Keyword validation failed: Value 2147483648 must be less or equal to 2147483648

Validation is good but the message is wrong, it should be less than 2147483648

Messages when using exclusiveMaximum true/false should be interchanged.

@scaytrase
Copy link
Member

Good catch! Looks like messages are swapped here

https://github.com/thephpleague/openapi-psr7-validator/blob/master/src/Schema/Keywords/Maximum.php#L60,L68

Would you like to open a PR?

sidux added a commit to sidux/openapi-psr7-validator that referenced this issue May 12, 2021
scaytrase pushed a commit that referenced this issue May 12, 2021
@sidux
Copy link
Contributor Author

sidux commented May 27, 2021

Hi, when this fix will be available in actual version tag ? thx

@scaytrase
Copy link
Member

beblife pushed a commit to beblife/schema-validation-laravel that referenced this issue Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants