PHPackages                             dmkulyk/nova-validation-toast - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. dmkulyk/nova-validation-toast

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

dmkulyk/nova-validation-toast
=============================

Enhanced validation toast messages for Laravel Nova with deduplication and improved error handling

v1.0.9(7mo ago)0981↓31.3%1MITJavaScriptPHP ^8.1|^8.2|^8.3CI passing

Since Oct 16Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/dmkulyk/nova-validation-toast)[ Packagist](https://packagist.org/packages/dmkulyk/nova-validation-toast)[ RSS](/packages/dmkulyk-nova-validation-toast/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

Nova Validation Toast
=====================

[](#nova-validation-toast)

Enhanced validation toast messages for Laravel Nova with deduplication and improved error handling.

🚨 The Problem
-------------

[](#-the-problem)

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.

✅ The Solution
--------------

[](#-the-solution)

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.

### Before (Standard Nova Behavior)

[](#before-standard-nova-behavior)

[![Standard Nova Message](https://raw.githubusercontent.com/dmkulyk/nova-validation-toast/main/images/standard_message.png)](https://raw.githubusercontent.com/dmkulyk/nova-validation-toast/main/images/standard_message.png)

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

### Problem (Without Package)

[](#problem-without-package)

[![Two Toast Messages](https://raw.githubusercontent.com/dmkulyk/nova-validation-toast/main/images/two_toasts.png)](https://raw.githubusercontent.com/dmkulyk/nova-validation-toast/main/images/two_toasts.png)

*Users see both generic and specific messages, creating confusion*

### After (With Nova Validation Toast)

[](#after-with-nova-validation-toast)

[![Nova Validation Toast Demo](https://raw.githubusercontent.com/dmkulyk/nova-validation-toast/main/images/screenshot.png)](https://raw.githubusercontent.com/dmkulyk/nova-validation-toast/main/images/screenshot.png)

*Clean, specific error messages that help users understand and fix validation errors*

✨ Features
----------

[](#-features)

- **🎯 Replaces Generic Messages**: Shows actual validation errors instead of "There was a problem submitting the form"
- **🚫 Error Deduplication**: Prevents duplicate toast messages within a 2-second window
- **📱 Console to Toast**: Moves validation errors from browser console to user-visible toasts
- **📋 JsonResponse Support**: Displays error messages from JSON responses
- **1️⃣ Single Toast Display**: Shows only one toast per error, preventing message spam
- **🔧 Server Error Handling**: Automatically extracts and displays server validation errors
- **🌐 Axios Interceptors**: Hooks into Nova's requests to catch and display errors
- **⚙️ Configurable**: Easy to extend with additional error patterns
- **✅ Laravel 10, 11 &amp; 12 Compatible**: Works with Laravel 10.x, 11.x, and 12.x
- **✅ Nova 4 &amp; 5 Compatible**: Works with both Nova 4.x and 5.x

📦 Installation
--------------

[](#-installation)

You can install the package via composer:

```
composer require dmkulyk/nova-validation-toast
```

The package will automatically register its service provider.

🚀 Usage
-------

[](#-usage)

The component automatically activates when Nova boots and enhances the default error handling behavior. No additional configuration is required.

### Customization

[](#customization)

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.

⚙️ Configuration
----------------

[](#️-configuration)

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
};
```

🔧 How it Works
--------------

[](#-how-it-works)

The component:

1. **Intercepts** Nova's error handling system
2. **Deduplicates** error messages to prevent spam
3. **Extracts** validation errors from server responses
4. **Displays** clean, user-friendly toast notifications
5. **Hooks** into both Nova's request system and global axios interceptors

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance65

Regular maintenance activity

Popularity20

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

10

Last Release

210d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.2PHP ^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/6391875e273a9a7cb8a6d9954d8da62e798ab08248f0b2d46129e83255082b34?d=identicon)[DmKulyk](/maintainers/DmKulyk)

---

Tags

laravelvalidationerror handlingnovatoast

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/dmkulyk-nova-validation-toast/health.svg)

```
[![Health](https://phpackages.com/badges/dmkulyk-nova-validation-toast/health.svg)](https://phpackages.com/packages/dmkulyk-nova-validation-toast)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
