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

Return correct error message when minLength validation failed #73

Merged
merged 1 commit into from Jul 23, 2020
Merged

Return correct error message when minLength validation failed #73

merged 1 commit into from Jul 23, 2020

Conversation

bhaskaraa2
Copy link
Contributor

Suppose, Schema contains one of the properties contains minLength like

{
    "type": "object",
    "properties": {
        "id": {
            "type": "string",
            "maxLength": 8,
            "minLength": 8
        }
    }
}

and attempted to validate JSON like

{
"id":"test"
}

Currently, Validation raises message like max length of 8 characters exceeded: test and it is invalid error message. This pull request contains error message correction.

Suppose, Schema contains one of the properties contains `minLength` like ```
{
    "type": "object",
    "properties": {
        "id": {
            "type": "string",
            "maxLength": 8,
            "minLength": 8
        }
    }
}
```
and attempted to validate JSON like 
```{
"id":"test"
}```
Currently, Validation raises message like `max length of 8 characters exceeded: test` and it is invalid error message
@Arqu Arqu merged commit 0995c6b into qri-io:master Jul 23, 2020
@Arqu
Copy link
Contributor

Arqu commented Jul 23, 2020

Thank you for catching this.

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.

2 participants