The Sailscasts Blog

← Back to blog

Boring Stack 0.1.3

Kelvin Omereshone

In this Boring Stack release, handling server-side validation errors and support for flash messages has been introduced πŸš€.

inertia-sails 0.1.8

I have really been letting this one fallow for a while as the obvious solution would have been a degradation from the benefit Inertia gave. It turned out that what was needed was a key ingredient - good old flash messages.

The implementation leverages sessions and reintroduced flash messages in your Sails applications via Sails Flash

You can read the validation docs for more on handling server side validation errors in The Boring JavaScript Stack.

A good side effect of using flash messages for validation errors is that you can now pass messages between requests via a shared flash object. Check out the docs on flash messages for more info.

sails-flash 0.0.1

Sails Flash as mentioned earlier implements support for flash messages in Sails applications and it’s now being leveraged by inertia-sails to provide validation errors handling support and flash messages as well.

See the full changelog on GitHub.

You can also check the login action and login page on the mellow-vue template to see these changes in action.

βœ… Upgrading

To start enjoying the DX of flash messages for validation error handling and for sharing messages across requests, upgrade inertia-sails and install sails-flash in your project:

npm i inertia-sails@latest sails-flash