-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Validation not invoked on Json #2757
Comments
Invoked at what point? Your code doesn't include any routes. |
@SergioBenitez, this is the route:
It seems like the validations are not running on Json. They do run on Form. |
Maybe it is related to the following: |
There's likely no bug here. You're using the |
Is there any way to make the |
Not at the moment. They simply work through different mechanisms. I do have a plan to align the different "data" processors to make that happen, but that will be a larger effort. |
Rocket Version
0.5.0
Operating System
macos
Rust Toolchain Version
rustc 1.76.0 (07dca489a 2024-02-04)
What happened?
Custom validation is never invoked.
Test Case
In that code I am trying to validate the email field according to a given regex. For some reason the
email_validation
function is never called.Any idea why? I was following the Rocket documentation as seen here: https://api.rocket.rs/master/rocket/form/validate/#custom-validation
Additional Context
No response
System Checks
rustc
toolchain.The text was updated successfully, but these errors were encountered: