PHPackages                             nixphp/form - 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. nixphp/form

ActiveNixphp-plugin[Utility &amp; Helpers](/categories/utility)

nixphp/form
===========

NixPHP Form Plugin to make form handling easier.

v0.1.1(4mo ago)0121↓50%1MITPHPPHP &gt;=8.3CI passing

Since Nov 30Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/nixphp/form)[ Packagist](https://packagist.org/packages/nixphp/form)[ RSS](/packages/nixphp-form/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (1)

[![Logo](https://camo.githubusercontent.com/075b2860e9651b98b8c190a8296595c54cff6900890d9e494f31131145e98a6f/68747470733a2f2f6e69787068702e6769746875622e696f2f646f63732f6173736574732f6e69787068702d6c6f676f2d736d616c6c2d7371756172652e706e67)](https://camo.githubusercontent.com/075b2860e9651b98b8c190a8296595c54cff6900890d9e494f31131145e98a6f/68747470733a2f2f6e69787068702e6769746875622e696f2f646f63732f6173736574732f6e69787068702d6c6f676f2d736d616c6c2d7371756172652e706e67)

[![NixPHP Form Plugin](https://github.com/nixphp/form/actions/workflows/php.yml/badge.svg)](https://github.com/nixphp/form/actions/workflows/php.yml)

[← Back to NixPHP](https://github.com/nixphp/framework)

---

nixphp/form
===========

[](#nixphpform)

> **Form handling the NixPHP way — minimal, secure, intuitive, extendable.**

This plugin provides **form memory**, **CSRF protection**, a flexible **Validator system**, and a full set of **view helpers** for easy form handling in your NixPHP applications.

Everything is registered automatically and works without configuration.

---

📦 Features
----------

[](#-features)

- ✔️ **Form input memory** (`memory()`, `memory_checked()`, `memory_selected()`)
- ✔️ **CSRF protection** via automatic event listener
- ✔️ **Validator system** with dynamic rule registry
- ✔️ **Built-in rules:** `required`, `email`, `min`, `max`, `boolean`
- ✔️ **Custom rules** via `Validator::register()`
- ✔️ **View helpers** (`error()`, `has_error()`, `error_class()`, `validator()`)
- ✔️ Automatically integrates into `guard()` and the event system
- ✔️ Zero configuration — plug and play

---

📥 Installation
--------------

[](#-installation)

```
composer require nixphp/form
```

The plugin registers itself. No additional setup needed.

---

🚀 Usage
-------

[](#-usage)

### 🧠 Form Memory

[](#-form-memory)

### `memory($key, $default = null)`

[](#memorykey-default--null)

Restores previous user input:

```
