requiredWithAny

Ensures the field is required when any of the other fields have non-empty values.

const rules = {
  password: 'required_with_any:username,email'
}

// or
const rules = {
  password: [
    rule('required_with_any', ['username', 'email'])
  ]
}

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

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