General

  eZ Systems Website
  Editor documentation


  Developer documentation

  Back to the top

The documentation is moving!

We're moving our developer docs to Github and a new site.
The migration is still in progress, so please contact us in #documentation-contrib on eZ Community Slack if you have any questions or feedback.

This space will not be updated from now on except for critical fixes.

Skip to end of metadata
Go to start of metadata

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

NameInternal nameExpected input type
EmailAddressezemailstring

Description

The EmailAddress Field Type stores an email address, which is provided as a string.

PHP API Field Type 

Value object

Properties

The Value class of this field type contains the following properties:

PropertyTypeDescription
$emailstringThis property will be used for the input string provided as email address.
Value object content example
Constructor

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

Constructor example
String representation

String representation of the Field Type's Value object is the email address 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 supplied as input against a pattern, to make sure that a valid email address has been provided.
If the validations fail a ValidationError  is thrown, specifying the error message.

Settings

This Field Type does not support settings.