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.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

This Field Type represents a simple string.

NameInternal nameExpected input type


This Field Type makes possible to store and retrieve a single line of unformatted text. It is capable of handling up to 255 number of characters.

PHP API Field Type

Value object


The Value class of this Field Type contains the following properties:

$textstringThis property will be used for the text content.
String representation

A TextLine's string representation is the the $text property's value, as a string.


The constructor for this value object will initialize a new Value object with the value provided. It accepts a string as argument and will import it to the text attribute.


The input passed into this filed type is subject of validation by the StringLengthValidator validator. The length of the string provided must be between the minimum length defined in minStringLength and the maximum defined in maxStringLength. The default value for both properties is 0, which means that the validation is disabled by default.
To set the validation properties the validateValidatorConfiguration() method needs to be inspected, which will receive an array with minStringLength and maxStringLength like in the following representation:

No Format
    [minStringLength] => 1
    [maxStringLength] => 60