Enhanced validation toast messages for Laravel Nova with deduplication and improved error handling
dmkulyk/nova-validation-toast is a Laravel package for enhanced validation toast messages for laravel nova with deduplication and improved error handling.
It currently has 0 GitHub stars and 1.680 downloads on Packagist (latest version 1.1.7).
Install it with composer require dmkulyk/nova-validation-toast.
Discover more Laravel packages by dmkulyk
or browse all Laravel packages to compare alternatives.
Last updated
Enhanced validation toast messages for Laravel Nova with deduplication and improved error handling.
By default, Laravel Nova shows only a generic "There was a problem submitting the form" toast message when validation fails. The actual validation error messages are only visible in the browser console, making it difficult for users to understand what went wrong.
This package intercepts Nova's error handling and displays the actual error messages directly in toast notifications. Now users can see specific validation errors like "Database operation failed" or field-specific validation messages right in the UI, without the second generic toast message.

Generic error message that doesn't help users understand what went wrong

Users see both generic and specific messages, creating confusion

Clean, specific error messages that help users understand and fix validation errors
You can install the package via composer:
composer require dmkulyk/nova-validation-toast
The package will automatically register its service provider.
The component automatically activates when Nova boots and enhances the default error handling behavior. No additional configuration is required.
If you need to customize the error patterns or behavior, you can publish the JavaScript assets:
php artisan vendor:publish --tag=nova-validation-toast-assets
Then modify the published JavaScript file in public/vendor/nova-validation-toast/ to suit your needs.
You can modify the KNOWN_ERRORS object in the JavaScript to add more error patterns that should be suppressed or handled differently:
const KNOWN_ERRORS = {
formSubmit: 'there was a problem submitting the form',
// Add more known error strings here as needed
};
The component:
The MIT License (MIT). Please see License File for more information.