Skip to the content
Documentation

Float Field Type: old version (page id 32870041)

No ratings yet

This Field Type represents a float value.

Name Internal name Expected input
Float ezfloat float

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.

Type Example
float 194079.572
int 144

Value object

Properties

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

Property Type Description
$value float This 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:

Name Type Default value Description
minFloatValue float null This setting defines the minimum value this FieldType will allow as input.
maxFloatValue float null This setting defines the maximum value this FieldType will allow as input.

Validator configuration example in PHP

Settings

This Field Type does not support settings.

 

 

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.