const rules = {
username: 'not_equals:root'
}
// or
const rules = {
username: [
rule('not_equals', 'root')
]
}
Makes sure that the value of field under validation is not same as the defined value.
const rules = {
username: 'not_equals:root'
}
// or
const rules = {
username: [
rule('not_equals', 'root')
]
}
For customized build, you can import this rule as follows.
import { notEquals } from 'indicative/builds/validations'