Skip to content

Flash field errors with flashInputErrors

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Nov 08:11
Immutable release. Only release title and notes can be modified.

8.4.0 (2026-11-19)

This release adds session.flashInputErrors(), to flash an error for a form field with no validation exception.

session.flashInputErrors()

An app can need to give an error to a form field after the validation, for example "This email is already registered". The @inputError tag of Edge and the Inertia adapter read these errors from the inputErrorsBag flash key. Before, only flashValidationErrors() wrote this key, and it needs a VineJS ValidationException.

session.flashInputErrors({ email: 'This email is already registered' })
  • A message is a string or an array of strings.
  • The messages are added to the messages already flashed for the same field.
  • It does not write to errorsBag, and it does not flash the request input.

Apps that write session.flash('inputErrorsBag', ...) by hand can use it instead.

Features

  • session: flash field errors without a validation exception (#105) (b97d213)

Full Changelog: v8.3.0...v8.4.0