Index
Edit

Number

Any number, e.g. 900900.09E+2 or 9.0E+2.

Properties

typestring

Required. Value must be set to number.

titlestring

Human readable label for the field.

namestring

Required. The field name. This will be the key in the data record.

hiddenboolean

If set to true, this field will be hidden in the Content Studio.

readOnlyboolean

If set to true, this field will not be editable in the content studio.

descriptionstring

Short description to editors how the field is to be used.

Validation

For more usage information see the full validation documentation.

required()

Ensures that this field exists.

min(minNumber)

Minimum value (inclusive).

max(maxNumber)

Maximum value (inclusive).

lessThan(limit)

Value must be less than the given limit.

greaterThan(limit)

Value must be greater than the given limit.

integer()

Value must be an integer (no decimals).

precision(limit)

Specifies the maximum number of decimal places allowed.

positive()

Requires the number to be positive (>= 0).

negative()

Requires the number to be negative (< 0).

custom(fn)

Create a custom validation.

Schema
{
  title: 'Current popularity',
  name: 'popularity',
  type: 'number'
}
JSON output
{
  "_type": "movie",
  "popularity": 12.5,
  ...
}
Gotcha

Never use number for storing a phone-number. Minimize pain down the road and use string instead.

Previous: TextNext: Boolean