trim

Remove whitespace from both sides of a given string.

const sanitizationRules = {
  username: 'trim'
}

// or
const sanitizationRules = {
  username: [
    rule('trim')
  ]
}

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

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