MCPcopy Create free account
hub / github.com/adonisjs/session / flashErrors

Method flashErrors

src/session.ts:430–432  ·  view source on GitHub ↗

* Flashes errors to the errorsBag. You can read these errors via the "@error" tag. * Appends new messages to the existing collection. * * @param errorsCollection - Collection of error messages * * @example * session.flashErrors({ * general: 'Something went wrong', * valid

(errorsCollection: Record<string, string | string[]>)

Source from the content-addressed store, hash-verified

428 * })
429 */
430 flashErrors(errorsCollection: Record<string, string | string[]>) {
431 this.flash({ errorsBag: errorsCollection })
432 }
433
434 /**
435 * Flashes validation error messages. Make sure the error is an instance of VineJS ValidationException.

Callers 2

flashValidationErrorsMethod · 0.95
session.spec.tsFile · 0.80

Calls 1

flashMethod · 0.95

Tested by

no test coverage detected