'0' -> 0
'1' -> 1
'true' -> true
'false' -> false
Ensures the value of a field is a boolean. Also it will cast following strings to their boolean counter parts.
'0' -> 0
'1' -> 1
'true' -> true
'false' -> false
const rules = {
remember_me: 'boolean'
}
// or
const rules = {
remember_me: [
rule('boolean')
]
}
For customized build, you can import this rule as follows.
import { boolean } from 'indicative/builds/validations'