Enum
class Enum implements Rule, ValidatorAwareRule (View source)
Properties
protected string | $type | The type of the enum. |
|
protected Validator | $validator | The current validator instance. |
Methods
void
__construct(string $type)
Create a new rule instance.
bool
passes(string $attribute, mixed $value)
Determine if the validation rule passes.
string|array
message()
Get the validation error message.
$this
Details
void
__construct(string $type)
Create a new rule instance.
bool
passes(string $attribute, mixed $value)
Determine if the validation rule passes.
string|array
message()
Get the validation error message.
$this
setValidator(Validator $validator)
Set the current validator.