Skip to main content

Module browser

Module browser 

Source
Expand description

Browser and Inertia validation using request-scoped session flash data.

Install flash_middleware inside the session layer, and pass page props through validation_page_props before rendering. Use BrowserValidated on form/JSON handlers, with authorization in an outer route layer. API requests retain the JSON validation response.

Structs§

BrowserValidated
An Axum extractor that validates after any outer authorization middleware.
SafeOldInput
Explicit application-owned projection of non-sensitive, non-file form fields.
ValidationFlash
Flash data is removed on the next request, regardless of its route.

Traits§

OldInput
Implement on request data to select only fields safe to flash back to users.

Functions§

flash_middleware
Read and remove validation flash once per request. Must run inside the session layer.
validation_page_props
Add errors and old to route props before passing them to Inertia.