PHPackages                             nepada/email-address-input - 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. nepada/email-address-input

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

nepada/email-address-input
==========================

Email address form input for Nette forms.

v1.9.2(5mo ago)36.2k↓33.3%[3 PRs](https://github.com/nepada/email-address-input/pulls)BSD-3-ClausePHPPHP &gt;=8.1.0 &lt;8.6CI failing

Since Jun 3Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/nepada/email-address-input)[ Packagist](https://packagist.org/packages/nepada/email-address-input)[ RSS](/packages/nepada-email-address-input/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (22)Used By (0)

Email address form input
========================

[](#email-address-form-input)

[![Build Status](https://github.com/nepada/email-address-input/workflows/CI/badge.svg)](https://github.com/nepada/email-address-input/actions?query=workflow%3ACI+branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/bb60cf08ab953ef63efce8a15700eeef2e5b40ca3f67df66c740ca3bd2d03e64/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e65706164612f656d61696c2d616464726573732d696e7075742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/nepada/email-address-input?branch=master)[![Downloads this Month](https://camo.githubusercontent.com/4dbac86b66e3845b209cde5d18c65e81e1ca337c41ea464fb683513074af16cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e65706164612f656d61696c2d616464726573732d696e7075742e737667)](https://packagist.org/packages/nepada/email-address-input)[![Latest stable](https://camo.githubusercontent.com/785935005b3a1830041caa2ed80cfb02b87a62c3e636c33b1d5ffbd8f1a9a81a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65706164612f656d61696c2d616464726573732d696e7075742e737667)](https://packagist.org/packages/nepada/email-address-input)

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

[](#installation)

Via Composer:

```
$ composer require nepada/email-address-input
```

### Option A: install form container extension method via DI extension

[](#option-a-install-form-container-extension-method-via-di-extension)

```
extensions:
    - Nepada\Bridges\EmailAddressInputDI\EmailAddressInputExtension
```

It will register extension method `addEmailAddress($name, $label, $caseSensitive = false)` to `Nette\Forms\Container`.

### Option B: use trait in your base form/container class

[](#option-b-use-trait-in-your-base-formcontainer-class)

You can also use `EmailAddressInputMixin` trait in your base form/container class to add method `addEmailAddress($name, $label, $caseSensitive = false)`.

Example:

```
trait FormControls
{

    use Nepada\Bridges\EmailAddressInputForms\EmailAddressInputMixin;

    public function addContainer($name)
    {
        $control = new Container;
        $control->setCurrentGroup($this->getCurrentGroup());
        if ($this->currentGroup !== null) {
            $this->currentGroup->add($control);
        }
        return $this[$name] = $control;
    }

}

class Container extends Nette\Forms\Container
{

    use FormControls;

}

class Form extends Nette\Forms\Form
{

    use FormControls;

}
```

Usage
-----

[](#usage)

`EmailAddressInput` is form control that uses email address value object to represent its value (see [nepada/email-address](https://github.com/nepada/email-address) for further details). It automatically validates the user input and `getValue()` method always returns `EmailAddress` instance, or `null` if the input is not filled.

```
$emailAddressInput = $form->addEmailAddress('E-mail');

// set value using EmailAddress value object
$emailAddressInput->setValue(CaseInsensitiveEmailAddress::fromString('example@example.com'));

// set value using string with a valid email address (it is internally converted to EmailAddress value object)
$emailAddressInput->setValue('example@example.com');

// Get EmailAddress instance for example@example.com
$emailAddressInput->getValue();

// InvalidEmailAddressException is thrown
$emailAddressInput->setValue('42');
```

### Case sensitivity

[](#case-sensitivity)

By default the input returns instance of `CaseInsensitiveEmailAddress`, i.e. the value object that treats the whole email address as case insensitive.

You can change this behaviour by calling `EmailAddressInput::setCaseSensitive(true)`, or by passing `$caseSensitive = true` when creating the input. With enabled case sensitivity the input's value will be represented as `RfcEmailAddress` instance.

For further details see the readme of [nepada/email-address](https://github.com/nepada/email-address).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance75

Regular maintenance activity

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 54.7% 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 ~170 days

Recently: every ~283 days

Total

17

Last Release

177d ago

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

v1.4.0PHP &gt;=7.2.0

v1.5.0PHP &gt;=7.4.0

v1.8.0PHP &gt;=7.4.0 &lt;8.2

v1.8.1PHP &gt;=7.4.0 &lt;8.3

v1.9.0PHP &gt;=8.1.0 &lt;8.4

v1.9.1PHP &gt;=8.1.0 &lt;8.5

v1.9.2PHP &gt;=8.1.0 &lt;8.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b4780fe328102c4572737db639653c29d3081d1d3e051467f00d7f09a776399?d=identicon)[xificurk](/maintainers/xificurk)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (152 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (126 commits)")

---

Tags

netteforminputemail address

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nepada-email-address-input/health.svg)

```
[![Health](https://phpackages.com/badges/nepada-email-address-input/health.svg)](https://phpackages.com/packages/nepada-email-address-input)
```

###  Alternatives

[nette/schema

📐 Nette Schema: validating data structures against a given Schema.

1.0k336.4M125](/packages/nette-schema)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[uestla/recaptcha-control

reCAPTCHA control for Nette Framework forms

26572.0k1](/packages/uestla-recaptcha-control)[aura/input

This package contains tools to describe and filter user inputs from an HTML form, including sub-forms/sub-fieldsets, fieldset collections, an interface for injecting custom filter systems, and CSRF protection. Note that this package does not include output functionality, although the "hints" provided by the Form object can be used with any presentation system to generate an HTML form.

6678.4k4](/packages/aura-input)[linio/input

Abstracts HTTP request input handling, providing an easy interface for data hydration and validation

3856.2k](/packages/linio-input)[tomaj/nette-bootstrap-form

Nette bootstrap form renderer

28440.4k6](/packages/tomaj-nette-bootstrap-form)

PHPackages © 2026

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