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

1.1.7(1mo ago)01.7k↓85.7%1MITJavaScriptPHP ^8.1|^8.2|^8.3|^8.4CI failing

Since Oct 16Pushed 1mo 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 today

READMEChangelog (3)Dependencies (8)Versions (19)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

48

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~13 days

Recently: every ~0 days

Total

18

Last Release

46d ago

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

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

v1.1.0PHP ^8.1|^8.2|^8.3|^8.4

### 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

[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel

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

Data Transfer Objects with validation for Laravel applications

762649.9k18](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.4M7](/packages/laravel-validation-rules-credit-card)[illuminatech/validation-composite

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

183530.2k](/packages/illuminatech-validation-composite)[sandermuller/laravel-fluent-validation

Fluent validation rule builders for Laravel

20719.0k4](/packages/sandermuller-laravel-fluent-validation)[romegasoftware/laravel-schema-generator

Generate TypeScript Zod validation schemas from Laravel validation rules

3219.4k](/packages/romegasoftware-laravel-schema-generator)

PHPackages © 2026

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