toInt

Converts value to an integer using parseInt.

const sanitizationRules = {
  age: 'to_int'
}

// or
const sanitizationRules = {
  age: [
    rule('to_int')
  ]
}

For customized build, you can import this rule as follows.

import { toInt } from 'indicative/builds/validations'