A Laravel Nova field that validates for uniqueness while typing through an AJAX request, instead of on-save in Nova.
This field validates for uniqueness while typing through an AJAX request, instead of on-save in Nova.
Install through composer: composer require epartment/nova-unique-ajax-field
Add a new Unique
field to your Nova Resource:
use Epartment\NovaUniqueField\Unique;
Unique::make('Email')
Unique::make('Email', 'email')
->actOn(Unique::KEY_UP)
->notUniqueMessage('Not Unique!')
->keyUpDelay(500),
It is possible to validate on Key Up (with adjustable delay) or Blur.
The MIT License (MIT). Please see License File for more information.