allowed = $allowed; return true; } public function check(&$value) { return in_array($value, $this->allowed, true); } /** * Default message * @return string */ public function defaultMessage(): string { return _t('error', 'The [attribute] must be accepted'); } }