You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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. fromJson<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.
The text was updated successfully, but these errors were encountered: