General

  eZ Systems Website
  Editor documentation


  Developer documentation

  Back to the top

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This Field Type represents a float value.

NameInternal nameExpected input
Floatezfloatfloat

Description

This Field Type stores numeric values which will be provided as floats.

Input expectations

The Field Type expects a number as input. Both decimal and integer numbers are accepted.

TypeExample
float

194079.572

int144

Value object

Properties

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

PropertyTypeDescription
$valuefloatThis property will be used to store the value provided as a float.
Value object content example

Constructor

The Float\Value constructor will initialize a new Value object with the value provided. It expects a numeric value with or without decimals.

Constructor example

Validation

This Field Type supports FloatValueValidator, defining maximal and minimal float value:

NameTypeDefault valueDescription
minFloatValuefloatfalseThis setting defines the minimum value this FieldType will allow as input.
maxFloatValuefloatfalseThis setting defines the maximum value this FieldType will allow as input.
Validator configuration example in PHP

Settings

This Field Type does not support settings.

 

 

  • No labels