Giter VIP home page Giter VIP logo

pulse-validation-errors's Introduction

Validation errors card for Laravel Pulse

A card for Laravel Pulse to show validation errors impacting users.

Validation errors card for Laravel Pulse

Installation

First, install the package via composer:

composer require timacdonald/pulse-validation-errors

Next, add the recorder to your config/pulse.php:

return [
    // ...

    'recorders' => [
        TiMacDonald\Pulse\Recorders\ValidationErrors::class => [
            'enabled' => env('PULSE_VALIDATION_ERRORS_ENABLED', true),
            'sample_rate' => env('PULSE_VALIDATION_ERRORS_SAMPLE_RATE', 1),
            'capture_messages' => true,
            'ignore' => [
                // '#^/login$#',
                // '#^/register$#',
                // '#^/forgot-password$#',
            ],
        ],

        // ...
    ],
];

Warning

Make sure to configure the sample_rate for your application. This card may capture a lot of data if you have a lot of users hitting validation errors.

Next, add the card to your resources/views/vendor/pulse/dashboard.php:

<x-pulse>
    <livewire:pulse.validation-errors cols="8" rows="4" />

    <!-- ... -->
</x-pulse>

Finally, get to improving your user experience. At LaraconUS I gave a talk on how much our validation sucks. If you are here, you likely also care about how your users experience validation errors on your app, so I'd love you to give it a watch.

Features

  • Supports multiple error bags
  • Supports session based validation errors
  • Supports API validation errors
  • Support Inertia validation errors
  • Support Livewire validation errors
  • Fallback for undetectable validation errors (based on 422 response status)

pulse-validation-errors's People

Contributors

timacdonald avatar stevethomas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.