We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current Behavior: Error messages contain indices of elements from the previous request.
Expected Behavior: Error messages should be idempotent; for two identical requests, I expect the same error message.
Parameters:
params do requires :items, type: Array do requires :item, type: Hash do requires :name, type: String end end end
Sequence of Requests:
Request 1: {} Response: 'items is missing, items[item][name] is missing'
{}
Request 2: {"items":[{"item":{"name":"foo"}},{"item":{"name":"foo"}},{}]} Response: 'items[2][item] is missing, items[2][item][name] is missing'
{"items":[{"item":{"name":"foo"}},{"item":{"name":"foo"}},{}]}
Request 3: {} Response: 'items is missing, items[2][item][name] is missing'
The response to the last request should be the same as the response to the first request.
This issue is reproducible in version 1.7.1 and in the main branch.
The text was updated successfully, but these errors were encountered:
I could reproduce in within 1.5.3. That's an old one. Thank you for pointing out and the specs
Sorry, something went wrong.
@seriousdev-gh found a way to fix it
Successfully merging a pull request may close this issue.
Current Behavior: Error messages contain indices of elements from the previous request.
Expected Behavior: Error messages should be idempotent; for two identical requests, I expect the same error message.
Parameters:
Sequence of Requests:
Request 1:
{}
Response: 'items is missing, items[item][name] is missing'
Request 2:
{"items":[{"item":{"name":"foo"}},{"item":{"name":"foo"}},{}]}
Response: 'items[2][item] is missing, items[2][item][name] is missing'
Request 3:
{}
Response: 'items is missing, items[2][item][name] is missing'
The response to the last request should be the same as the response to the first request.
This issue is reproducible in version 1.7.1 and in the main branch.
The text was updated successfully, but these errors were encountered: