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

EmailAddress Field Type

=20
=20
=20
=20

This Field Type represents an email address, in the form of a string.

Name Internal name Expected input type
EmailAddress ezemail string

Description

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

PHP API Field Type 

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 representation=

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.

 

=20
=20
=20
=20

 

=20
=20
=20
------=_Part_4117_298380974.1485857791937--