PHPackages                             marshmallow/nova-field-string-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. marshmallow/nova-field-string-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marshmallow/nova-field-string-generator
=======================================

A Laravel Nova field for generating a random string. This can be used for a Text field and for a Password field.

v2.1.1(1y ago)550.6k↑10.4%2[1 PRs](https://github.com/marshmallow-packages/nova-field-string-generator/pulls)MITVuePHP ^8.0CI passing

Since Apr 3Pushed 1w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/nova-field-string-generator)[ Packagist](https://packagist.org/packages/marshmallow/nova-field-string-generator)[ RSS](/packages/marshmallow-nova-field-string-generator/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (13)Used By (0)

[![alt text](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67 "marshmallow.")](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67)

Nova Random String Generation Field
===================================

[](#nova-random-string-generation-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/520c4b6a0d021d629738a3a6f4634c4941b2074c9935593b7afefe6f4d3c8190/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f6e6f76612d6669656c642d737472696e672d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/nova-field-string-generator)[![Total Downloads](https://camo.githubusercontent.com/1320390b7ba922fab0b9d9dd763492baa4c04fb01bc752c7701412d9bccbfc1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f6e6f76612d6669656c642d737472696e672d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/nova-field-string-generator)

A Laravel Nova field for generating a random string. This can be used for a Text field and for a Password field.

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

[](#installation)

Install the package into a Laravel application that uses Nova via Composer:

```
composer require marshmallow/nova-field-string-generator
```

The field's service provider is auto-discovered, so there is nothing else to register.

Usage
-----

[](#usage)

The package ships two fields, both living in the `Marshmallow\NovaGenerateString` namespace:

- `GenerateString` — extends Nova's `Text` field.
- `GeneratePassword` — extends Nova's `Password` field.

Add them to the `fields()` method of your Nova resource:

```
use Marshmallow\NovaGenerateString\GenerateString;
use Marshmallow\NovaGenerateString\GeneratePassword;

public function fields(NovaRequest $request)
{
    return [
        GenerateString::make(__('Random string'), 'random_string')
            ->onlyOnForms()
            ->creationRules('required', 'string', 'min:12')
            ->updateRules('nullable', 'string', 'min:12')
            // Specify the length of the generated string.
            ->length(12)
            // Exclude character types from the generated string. Available types:
            // Symbols, Numbers, Uppercase, Lowercase, Similar.
            // Omit this call to include all types.
            ->excludeRules(['Symbols', 'Lowercase', 'Similar']),

        GeneratePassword::make(__('Password'), 'password'),
    ];
}
```

Because both fields extend their respective Nova base fields (`Text` and `Password`), every standard Nova field method (`rules()`, `onlyOnForms()`, `creationRules()`, `updateRules()`, etc.) is available alongside the generator-specific methods below.

### Available methods

[](#available-methods)

MethodDescription`length(int $length)`Sets the length of the generated string.`excludeRules(array $rules)`Excludes character types from the generated string. Accepts any of `Symbols`, `Numbers`, `Uppercase`, `Lowercase`, `Similar`. Omit it to include every type.Credits
-------

[](#credits)

- [Marshmallow](https://github.com/marshmallow-packages)
- [All Contributors](https://github.com/marshmallow-packages/nova-field-string-generator/contributors)

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please report security vulnerabilities by email rather than via the public issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance76

Regular maintenance activity

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 74.5% 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.

###  Release Activity

Cadence

Every ~318 days

Recently: every ~400 days

Total

7

Last Release

372d ago

Major Versions

v1.1.1 → v2.0.02022-05-06

PHP version history (3 changes)v1.0.0PHP &gt;=7.1.0

v1.1.1PHP ^7.1|^8.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (35 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![LTKort](https://avatars.githubusercontent.com/u/2412670?v=4)](https://github.com/LTKort "LTKort (3 commits)")[![rzv-me](https://avatars.githubusercontent.com/u/38325118?v=4)](https://github.com/rzv-me "rzv-me (1 commits)")

---

Tags

laravelpasswordnova

### Embed Badge

![Health badge](/badges/marshmallow-nova-field-string-generator/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-nova-field-string-generator/health.svg)](https://phpackages.com/packages/marshmallow-nova-field-string-generator)
```

###  Alternatives

[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2852.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2862.1M9](/packages/outl1ne-nova-sortable)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

92219.3k3](/packages/advoor-nova-editor-js)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

58249.9k](/packages/sbine-route-viewer)

PHPackages © 2026

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