Rule
abstract class Rule (View source)
Properties
| protected | $failure | ||
| protected | $alloweds | ||
| protected | $messages |
Methods
bool
exec(string $path, mixed $value, string|null $param, array $rules)
Executes the rule on a value.
isAllowed(array $rules)
Check if the rules are accepted
bool
passed()
Validate after set $failure
string|null
getFailure()
Returns a string if a failure occurs; otherwise, returns null
setMessage(string $type, string $message)
No description
Details
abstract bool
exec(string $path, mixed $value, string|null $param, array $rules)
Executes the rule on a value.
final protected
isAllowed(array $rules)
Check if the rules are accepted
final protected bool
passed()
Validate after set $failure
final string|null
getFailure()
Returns a string if a failure occurs; otherwise, returns null
final
setMessage(string $type, string $message)
No description