Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Nova Unique Ajax Field

Nova Unique Ajax Field Laravel Package

epartment/nova-unique-ajax-field

A Laravel Nova field that validates uniqueness via AJAX as users type, giving instant feedback and preventing duplicate values without waiting for form submission. Easy to add to Nova resources and ideal for usernames, emails, slugs, and other unique identifiers.

View on GitHub
Deep Wiki
Context7

A Laravel Nova field that validates for uniqueness while typing through an AJAX request, instead of on-save in Nova.

Frequently asked questions about Nova Unique Ajax Field
How do I install epartment/nova-unique-ajax-field in Laravel Nova?
Install it with Composer using composer require epartment/nova-unique-ajax-field, then reference the field class inside your Nova resource. The package follows the standard Nova custom-field model: a Composer package, service provider registration, a Vue field component, and a backend validation endpoint. After installing, rebuild your Nova frontend assets and clear caches, and check the repository README for the exact namespace and available configuration options.
Which Laravel Nova versions does this AJAX unique field support?
The provided overview does not state a Nova major-version compatibility matrix, so verify support against your project's Nova and Laravel versions before adopting it. Integration fit is strong for teams already on Laravel with Nova as their admin panel, but unverified compatibility is a genuine risk. Pin the package version and validate it in staging rather than assuming it works across Nova majors.
Why do I get a class not found error for UniqueAjax after upgrading to 1.0.2?
Release 1.0.2 renames the field class from UniqueAjax to Unique, so any Nova resource still importing or referencing the old name will fail with a class-not-found error. Search your Nova resource files for UniqueAjax, replace those references with Unique, and update any related imports. Then rebuild Nova assets and retest your create and update forms.
How do I migrate from UniqueAjax to the Unique class in my Nova resources?
Start by inventorying every usage of UniqueAjax across your Nova resources, then upgrade the package on a branch and apply the rename. Next, rebuild Nova components and clear caches, then test create and update forms against representative models and database engines before deploying with a rollback plan. Pinning to 1.0.1 until the rename is validated in staging is a sensible safeguard.
Does this package replace database unique constraints?
No. The AJAX check only provides instant UI feedback while the user types; it does not replace database-level unique indexes. Race conditions remain possible, so keep unique constraints as the source of truth and treat this field as a user-experience improvement. Without those indexes you risk false confidence in uniqueness.
How should I secure and throttle the AJAX uniqueness endpoint?
The package ships a backend validation endpoint for the AJAX request, so it needs proper authorization, throttling, and query-scope handling. The provided assessment does not confirm whether the package publishes configuration for endpoint middleware or throttling, so audit the source before relying on defaults. Also index the validated columns to keep per-keystroke or per-blur requests from creating database load.
Can I use this field for emails, usernames, and slugs in Nova?
Yes. The field is intended for usernames, emails, slugs, and other unique identifiers, validating uniqueness while the user types instead of on save. That instant feedback helps prevent duplicate values without waiting for form submission. Make sure the underlying columns are indexed so the asynchronous checks stay fast on large datasets.
Does the field work with soft deletes and custom model query scopes?
The technical evaluation flags soft deletes, custom model scopes, and endpoint authorization as areas without confirmed test coverage. Verify the behavior in staging with your own models before depending on it. If your model uses soft deletes, check explicitly whether the validation query excludes trashed records correctly.
How do I test the AJAX unique validation in a Laravel Nova form?
Exercise the create and update forms against representative models and database engines in staging, and hit the AJAX endpoint directly to check authorization failures, throttling, and query exceptions. Since coverage for authorization, soft deletes, and custom scopes is unverified, add your own feature tests. Also confirm your frontend assets were rebuilt, because stale Nova assets are a common failure mode after upgrades.
Should I pin to 1.0.1 or look for alternatives to this Nova unique field?
Pinning to 1.0.1 is advisable until the Unique class rename is validated in staging, since a breaking change shipped in a patch release signals weak semantic versioning discipline. If you would rather avoid coordinated code changes right now, stay on the older release while you plan the rename. The overview does not name alternatives, so compare other Nova unique-validation fields if maintenance responsiveness becomes a concern.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment