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

Expose form validation methods for direct usage #1945

Closed
pikajude opened this issue Oct 13, 2021 Discussed in #1914 · 1 comment
Closed

Expose form validation methods for direct usage #1945

pikajude opened this issue Oct 13, 2021 Discussed in #1914 · 1 comment

Comments

@pikajude
Copy link

Discussed in #1914

Originally posted by pikajude September 21, 2021
I can accept a Result<Form<T>, Errors<'_>> in a form handler which seems to do the validation automatically, but I can't find any manual way to apply the validation logic to an object I already have (i.e. from Json<T>)

I'm foregoing forms in Rocket entirely and writing a JSON API which my JS frontend will also use so I don't have to write two versions of every endpoint that my app has. However, I don't think I can use form validation on request data manually.

@pikajude
Copy link
Author

Sorry, looks like this is a duplicate of #1915.

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

No branches or pull requests

1 participant