Number

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

Properties

  • REQUIREDtypestring

    Value must be set to number.

  • REQUIREDnamestring

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

  • titlestring

    Human readable label for the field.

  • hiddenboolean

    If set to true, this field will be hidden in the 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.

Options

  • listarray

    A list of predefined values that the user may pick from. The array can include numeric values [1, 2] or objects [{value: 1, title: 'One'}, ...].

Validation

Learn more about validation

Input

{
  title: 'Current popularity',
  name: 'popularity',
  type: 'number'
}

Output

{
  "_type": "movie",
  "popularity": 12.5,
  ...
}

Gotcha

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

Was this article helpful?