When there are nested fields and multiple fields fail validation, the error messages lack a delimiter.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Reproduce the nested UserQueryParams example with both page and size validation failures, then trace where the nested validation messages are aggregated. Done means the combined messages have a clear delimiter and a regression test covers multiple failing nested fields.
Written by the indexing model from the issue text.
Description
#[derive(Debug, Deserialize, Validate)]
#[serde(rename_all = "camelCase")]
pub struct UserQueryParams {
keyword: Option<String>,
#[validate(nested)]
#[serde(flatten)]
pagination: PaginationParams,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Validate)]
pub struct PaginationParams {
#[validate(range(min = 1, message = "Page must be greater than 0."))]
pub page: u64,
#[validate(range(min = 1, max = 100, message = "The page size must be between 1 and 100."))]
pub size: u64,
}
When there are nested fields and multiple fields fail validation, the error messages lack a delimiter.
I personally consider this to be a minor bug. If it was originally designed without a separator, I sincerely apologize for any inconvenience this may have caused
- Dominant language
- Rust
- Stars
- 2.5k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Keats/validator
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
Improve `ValidationError` `Display`Possibly taken @mscofield0 claimed this 257 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nervosnetwork/ckb#5405 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
Releases do not move the `latest` Docker tag: the branch `30.12` is taken for the latest release branchPossibly taken @alexey-milovidov claimed this today. Opencomp-ci-infrastructure unexpected behaviour
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ClickHouse/ClickHouse#134282 ·
Maintainers usually reply within 1 day
-
macOS agent: camera watcher leaks autorelease-pool entries every second (no pool on its thread)Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day