Download the PHP package nepada/email-address-input without Composer
On this page you can find all versions of the php package nepada/email-address-input. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nepada/email-address-input
More information about nepada/email-address-input
Files in nepada/email-address-input
Package email-address-input
Short Description Email address form input for Nette forms.
License BSD-3-Clause
Informations about the package email-address-input
Email address form input
Installation
Via Composer:
Option A: install form container extension method via DI extension
It will register extension method addEmailAddress($name, $label, $caseSensitive = false)
to Nette\Forms\Container
.
Option B: use trait in your base form/container class
You can also use EmailAddressInputMixin
trait in your base form/container class to add method addEmailAddress($name, $label, $caseSensitive = false)
.
Example:
Usage
EmailAddressInput
is form control that uses email address value object to represent its value (see 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.
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.
All versions of email-address-input with dependencies
nepada/email-address Version ^2.3@dev || ^3.0@dev
nette/utils Version ^3.2@dev || ^4.0@dev
nette/forms Version ^3.1@dev