Message-ID: <328605529.3370.1485852843397.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3369_698236540.1485852843397" ------=_Part_3369_698236540.1485852843397 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html The EmailAddress Field Type

The EmailAddress Field Type

This Field Type represents an email address, in the form of a st= ring.

Name Internal name Expected input type
EmailAddress ezemail string

Table of contents:

=20 =20

Description

The EmailAddress Field Type stores an email address, which is provi= ded as a string.

Value object

Properties

The Value class of this field type contain= s the following properties:

Property Type Description
$email string This property will be used for the input string = provided as email address.
Value object content example
=20
use eZ\Publish\Core\FieldType\EmailAddress\Type;

// Instantiates an EmailAddress Value object with default value (empty stri=
ng)
$emailaddressValue =3D new Type\Value();

// Email definition
$emailaddressValue->email =3D "someuser@example.com";
=20

Constructor

The EmailAddress\Value constructor will initialize a new V= alue object with the value provided. It accepts a string as input.

Constructor example
=20
use eZ\Publish\Core\FieldType\EmailAddress\Type;
 
// Instantiates an EmailAddress Value object
$emailaddressValue =3D new Type\Value( "someuser@example.com" );
=20

String representat= ion

String representation of the Field Type's Value object is the email addr= ess contained in it.

Example:

someuser@example.com

Hash format

Hash value for this Field Type's Value is simply the email address as a = string.

Example:

someuser@example.com

Validation

This Field Type uses the EmailAddressValidator validator as a resource which will test the string supp= lied as input against a pattern, to make sure that a valid email address ha= s been provided.
If the validations fail a Validation= Error  is thrown, specif= ying the error message.

Settings

This Field Type does not support settings.

 

------=_Part_3369_698236540.1485852843397--