const rules = {
email: 'required_without_any:username,account_id'
}
// or
const rules = {
email: [
rule('required_without_any', ['username', 'account_id'])
]
}
Ensures the field is required when all of the other fields has empty values.
const rules = {
email: 'required_without_any:username,account_id'
}
// or
const rules = {
email: [
rule('required_without_any', ['username', 'account_id'])
]
}
For customized build, you can import this rule as follows.
import { requiredWithoutAny } from 'indicative/builds/validations'