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

TextType - Over-length value validates when both max and min specified #4536

Open
gsteinert opened this issue Dec 28, 2017 · 0 comments
Open

Comments

@gsteinert
Copy link

Expected behavior

When both max and min are specified in a field definition, over length strings should be refused.

Actual/Current behavior

Over length string accepted

Steps to reproduce the actual/current behavior

Define a field as per below:
name: { type: Types.Text, required: true, min: 3, max: 5 },
Enter a string longer than 5 characters
Submit

Environment

Keystone master (0ca9eb1)
Node v9.2.0

Notes

Issue seems to be caused by a922b38. If min length validation passes, all other validation results are discarded.

@gsteinert gsteinert changed the title TextType - Over-length value validates when moth max and min specified TextType - Over-length value validates when both max and min specified Dec 28, 2017
gsteinert added a commit to gsteinert/keystone that referenced this issue Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants