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

Method flashErrors

src/session.ts:441–443  ·  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

439 * })
440 */
441 flashErrors(errorsCollection: Record<string, string | string[]>) {
442 this.flash({ errorsBag: errorsCollection })
443 }
444
445 /**
446 * Flashes error messages for form fields to the inputErrorsBag, the same

Callers 2

flashValidationErrorsMethod · 0.95
session.spec.tsFile · 0.80

Calls 1

flashMethod · 0.95

Tested by

no test coverage detected