Skip to content
KeystoneJS LogoKeystoneJS
👋🏻 We're working on the next generation of KeystoneJS! If you're using the @keystone-next packages, click here to learn more

Integer

A whole number.

Usage

JS
const { Integer, Text } = require('@keystonejs/fields');

keystone.createList('Review', {
  fields: {
    comments: { type: Text },
    rating: { type: Integer },
  },
});

Config

OptionTypeDefaultDescription
isRequiredBooleanfalseDoes this field require a value?
isUniqueBooleanfalseAdds a unique index that allows only unique values to be stored

On this page

  • Usage
  • Config
Edit on GitHub