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

error: Duplicate field regex #344

Open
iUnstable0 opened this issue Jul 31, 2024 · 4 comments
Open

error: Duplicate field regex #344

iUnstable0 opened this issue Jul 31, 2024 · 4 comments
Labels

Comments

@iUnstable0
Copy link

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!

@Keats
Copy link
Owner

Keats commented Jul 31, 2024

That was working before? I didn't realise it would

@iUnstable0
Copy link
Author

yup it was lol

@Keats Keats added the bug label Aug 7, 2024
@iUnstable0
Copy link
Author

was this intentional? because it'd be really useful to be able to match multiple regexes

@Keats
Copy link
Owner

Keats commented Aug 18, 2024

It was not intentional that it was working but I don't see a reason not to add it back. Would have to be from a PR though, i'm unlikely to have time for it anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants