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

[C++] Map key value string length message misleading #852

Open
xamix opened this issue Apr 25, 2023 · 1 comment
Open

[C++] Map key value string length message misleading #852

xamix opened this issue Apr 25, 2023 · 1 comment
Labels
Bug Reports and/or fixes a bug C++ C++ language support

Comments

@xamix
Copy link

xamix commented Apr 25, 2023

Hi,

I use the following rules on a map<string, string>:

(validate.rules).map.keys.string.min_len = 1,

And when the rule is not respected, the error message is ending by:

value length must be at least 1 characters

Shouldn't it be:

key length must be at least 1 characters

Besause it is not clear if the key or the value do not respect the rule

Regards

@rodaine rodaine added Bug Reports and/or fixes a bug C++ C++ language support labels Apr 26, 2023
@lehuunhan404
Copy link

lehuunhan404 commented Jun 27, 2023

[GO]
I use the following rules on a map<string, string>

[(validate.rules).map = {ignore_empty: true, keys: {string: {ignore_empty: true, pattern:"^[a-zA-Z- ]+$"}}, values: {string : {ignore_empty: true, pattern:"^[^<>]+$"}}}];

In file validate.go:

image

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reports and/or fixes a bug C++ C++ language support
Projects
None yet
Development

No branches or pull requests

3 participants