toNull

Converts empty strings and undefined to null. It is handy to keep data normalized at database level.

const sanitizationRules = {
  bio: 'to_null'
}

// or
const sanitizationRules = {
  bio: [
    rule('to_null')
  ]
}

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

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