PHPackages                             fullscreeninteractive/silverstripe-ajaxuniquetextfield - 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. fullscreeninteractive/silverstripe-ajaxuniquetextfield

ActiveSilverstripe-vendormodule[Validation &amp; Sanitization](/categories/validation)

fullscreeninteractive/silverstripe-ajaxuniquetextfield
======================================================

Text field that checks uniqueness via AJAX and server-side validation for a DataObject field.

018PHPCI failing

Since Apr 12Pushed 1mo agoCompare

[ Source](https://github.com/fullscreeninteractive/silverstripe-ajaxuniquetextfield)[ Packagist](https://packagist.org/packages/fullscreeninteractive/silverstripe-ajaxuniquetextfield)[ RSS](/packages/fullscreeninteractive-silverstripe-ajaxuniquetextfield/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

silverstripe-ajaxuniquetextfield
================================

[](#silverstripe-ajaxuniquetextfield)

[![CI](https://github.com/fullscreeninteractive/silverstripe-ajaxuniquetextfield/actions/workflows/ci.yml/badge.svg)](https://github.com/fullscreeninteractive/silverstripe-ajaxuniquetextfield/actions/workflows/ci.yml)

Provides `AjaxUniqueTextField` with client and server-side uniqueness validation on a `DataObject` field, an HTTP JSON endpoint, and a jQuery Entwine client script (load jQuery and Entwine in your project; the CMS admin already includes them).

Requirements
------------

[](#requirements)

- SilverStripe CMS **6.x** (`silverstripe/framework` ^6)
- **PHP** 8.3 or newer

Installation
------------

[](#installation)

Install with Composer from your project root (the same directory as your site’s `composer.json`):

```
composer require fullscreeninteractive/silverstripe-ajaxuniquetextfield
```

Then rebuild the database manifest so configuration and routes are picked up:

```
vendor/bin/sake dev/build flush=1
```

Or open `/dev/build?flush=1` in the browser while logged in as an administrator.

Exposed module assets are published by the [vendor plugin](https://github.com/silverstripe/vendor-plugin). If JavaScript does not load after an upgrade, run:

```
composer vendor-expose
```

Usage
-----

[](#usage)

```
use FullscreenInteractive\AjaxUniqueTextField\AjaxUniqueTextField;

$fields->push(
    AjaxUniqueTextField::create('Slug', 'URL segment', $this->Slug)
        ->setRecordClass(MyRecord::class)
        ->setUniqueField('Slug')
        ->setExcludeID($this->ID) // when editing an existing record
        // ->setValidateURL('https://example.com/custom-check') // optional
        // ->setRestrictedRegex('^[a-z0-9-]+$') // optional client-side gate before AJAX
);
```

The constructor matches `TextField`: `name`, `title`, `value`, optional `maxLength`, optional `Form`. Configure the DataObject class and field name with `setRecordClass()` and `setUniqueField()` before the field is rendered or validated.

Development
-----------

[](#development)

- `composer test` — PHPUnit (requires MySQL; see `vendor/silverstripe/framework/tests/bootstrap/environment.php` for defaults).
- `composer phpcs` — PSR-12 via PHP\_CodeSniffer.
- `composer phpstan` — static analysis.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance58

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/101629?v=4)[Will Rossiter](/maintainers/wilr)[@wilr](https://github.com/wilr)

---

Top Contributors

[![svandragt](https://avatars.githubusercontent.com/u/594871?v=4)](https://github.com/svandragt "svandragt (4 commits)")[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (3 commits)")

### Embed Badge

![Health badge](/badges/fullscreeninteractive-silverstripe-ajaxuniquetextfield/health.svg)

```
[![Health](https://phpackages.com/badges/fullscreeninteractive-silverstripe-ajaxuniquetextfield/health.svg)](https://phpackages.com/packages/fullscreeninteractive-silverstripe-ajaxuniquetextfield)
```

###  Alternatives

[ziming/laravel-zxcvbn

Zxcvbn Password validation rule for Laravel

3064.3k](/packages/ziming-laravel-zxcvbn)

PHPackages © 2026

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