ClosureValidationRule
class ClosureValidationRule implements Rule (View source)
Properties
| Closure | $callback | The callback that validates the attribute. |
|
| bool | $failed | Indicates if the validation callback failed. |
|
| string|null | $message | The validation error message. |
Methods
void
bool
passes(string $attribute, mixed $value)
Determine if the validation rule passes.
string|array
message()
Get the validation error message.
Details
void
__construct(Closure $callback)
Create a new Closure based validation rule.
bool
passes(string $attribute, mixed $value)
Determine if the validation rule passes.
string|array
message()
Get the validation error message.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.