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
text.validation.length.max error message not working properly in adminUI #7334
Comments
Could you make sure that you haven't set |
I set min to 3, max to 8. The validtaion logic is right, only if your input string is longer than 8, the red error message will show up. however the error message itsself is incorrect, it showed "Name must be no longer than 3 characters", which should be "must be no longer than 8 characters". |
@pkuwyn can you please paste your exact configuration? We can't reproduce this with the instructions provided 😕 |
|
@pkuwyn could you please copy paste - as text - your problematic Keystone schema? |
|
Any updates on this? I am getting the same error as @gnadenthal. #7334 (comment) |
After some tinkering around, we found that setting any value to the min would fix this issue. Incase you don't want to have a minimum required length, you can set it to be 0 and it will still work fine 👍🏻 |
@pkuwyn I can't reproduce this, I used your posted schema to no avail. @MohammadKurjieh if you can reproduce this, could you provide a repository that we could test on? What browser? |
@dcousens the issue is fixed now. The weird part was that I wasn't able to reproduce on my local machine only on the deployment server. I was running the same versions of node-npm-.... We cleared the npm caches removed the node_modules and updated keystone to the latest release (12 May 2022). We think this issue is resolved by this update link Note: the update didn't take place until we cleared everything... |
@MohammadKurjieh the decimal validation error was fixed in #7417, and it shouldn't have any effect on a |
1: npm init keystone-app
2: add code to a text field and run dev server
3: go to adminUI and try to input a name longer then 8 character.
the error message show :Name must be no longer than 3 characters ,
the error message uses the min property for the max validation error.
The text was updated successfully, but these errors were encountered: