const rules = {
username: 'max:40'
}
// or
const rules = {
username: [
rule('max', 40)
]
}
Ensures the length of a string or array is not greater than the defined length.
const rules = {
username: 'max:40'
}
// or
const rules = {
username: [
rule('max', 40)
]
}
For customized build, you can import this rule as follows.
import { max } from 'indicative/builds/validations'