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

Handle validation error message for zero value for certain rules as a special case #133

Merged
merged 9 commits into from
Dec 20, 2023

Conversation

oliversun9
Copy link
Contributor

@oliversun9 oliversun9 commented Nov 18, 2023

For some string/bytes rules, if the string/bytes value is empty, we show a slightly different validation error message indicating the value is empty.

},
(priv.field).cel = {
id: "string.hostname_empty",
message: "an empty value is not a valid hostname",
Copy link
Member

Choose a reason for hiding this comment

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

This is more a statement, it makes me ask the question "...ok, was my value empty?" I'd say something like "value was empty, and empty is not a valid X"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in 23bed22, which now reads "value is empty, which is not a valid X"

@oliversun9 oliversun9 requested a review from rodaine December 20, 2023 22:05
@oliversun9 oliversun9 merged commit 037d514 into main Dec 20, 2023
4 checks passed
@oliversun9 oliversun9 deleted the osun/special-case-zero-value branch December 20, 2023 22:11
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 this pull request may close these issues.

4 participants