8000 The message in ValidationError is not correct · Issue #219 · Azure/msrest-for-python · GitHub
[go: up one dir, main page]

Skip to content

The message in ValidationError is not correct #219

New issue

Have a question about this project? Sign u 8000 p 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

Open
zhoxing-ms opened this issue Aug 7, 2020 · 1 comment
Open

The message in ValidationError is not correct #219

zhoxing-ms opened this issue Aug 7, 2020 · 1 comment
Assignees

Comments

@zhoxing-ms
Copy link

Error Message:

# in msrest.exceptions
_messages = {
    "min_length": "must have length greater than {!r}.",
    "max_length": "must have length less than {!r}.",
    ...
}

code link: click

Validation Logic:

# in msrest.serialization
validation = {
    "min_length": lambda x, y: len(x) < y,
    "max_length": lambda x, y: len(x) > y,
    ...
}

code link: click

Expected Message:
According to the validation logic, the correct message should be

_messages = {
    "min_length": "must have length equal to or greater than {!r}.",
    "max_length": "must have length equal to or less than {!r}.",
    ...
}
@zhoxing-ms
Copy link
Author

@lmazuel Could you please help to have a look~

@lmazuel lmazuel self-assigned this Jan 11, 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

No branches or pull requests

2 participants
0