/var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Validation/Rules
Edit: /var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Validation/Rules/Enum.php (1012B)
type = $type;
}
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
if (is_null($value) || ! function_exists('enum_exists') || ! enum_exists($this->type)) {
return false;
}
return ! is_null($this->type::tryFrom($value));
}
/**
* Get the validation error message.
*
* @return array
*/
public function message()
{
return [
'The selected :attribute is invalid.',
];
}
}