loco-rs / loco

🚂 🦀 The one-person framework for Rust for side-projects and startups
https://loco.rs
Apache License 2.0
5.35k stars 226 forks source link

Scaffold should generate best practices for form validation #780

Open paramaw opened 1 month ago

paramaw commented 1 month ago

Feature Request

What should be the best practices for controller validation of forms? In Rails, if the edit and create actions are successful, the request gets redirected to a different action. If it fails, the current action re-renders the current view and shows the error message on the form.

Any ideas on what should be the convention to do in loco?

Describe the solution you'd like

If you feel that this should be the convention, then this convention should be part of the scaffold.