error: Duplicate field `regex`
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the duplicate-field error with the shown #[validate] attribute after upgrading from 0.16 to 0.18.1, then inspect the validation attribute handling involved in parsing repeated regex entries. Confirm whether multiple regex entries should be accepted and add a regression test covering the expected behavior.
Written by the indexing model from the issue text.
Description
I updated from 0.16 to 0.18.1 and now it's throwing me error error: Duplicate field regex
#[validate(
length(
min = 3,
max = 20,
message = "Username must be between 3 and 20 characters"
),
regex(
path = "USERNAME_ALLOWED_CHARACTERS",
message = "Username must only contain alphanumeric characters and underscores"
),
regex(
path = "USERNAME_UNDERSCORE_LIMIT",
message = "Username must contain no more than 1 underscore"
),
regex(
path = "USERNAME_UNDERSCORE_PLACEMENT",
message = "Username must not start or end with an underscore"
)
)]
Thank you!
- 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 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 55/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kashsuks/Pinel#172 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
test_a_503_raises_unavailable_error fails on macOS about one run in sixPossibly taken @naman-modi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug ui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
userFRM/egui-charts#4168 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day