diff --git a/validation.md b/validation.md index e6668537203..07944790ebb 100644 --- a/validation.md +++ b/validation.md @@ -1952,7 +1952,7 @@ Occasionally, you may want to attach additional validation rules to your default Laravel provides a variety of helpful validation rules; however, you may wish to specify some of your own. One method of registering custom validation rules is using rule objects. To generate a new rule object, you may use the `make:rule` Artisan command. Let's use this command to generate a rule that verifies a string is uppercase. Laravel will place the new rule in the `app/Rules` directory. If this directory does not exist, Laravel will create it when you execute the Artisan command to create your rule: ```shell -php artisan make:rule Uppercase --invokable +php artisan make:rule Uppercase ``` Once the rule has been created, we are ready to define its behavior. A rule object contains a single method: `__invoke`. This method receives the attribute name, its value, and a callback that should be invoked on failure with the validation error message: @@ -2108,7 +2108,7 @@ By default, when an attribute being validated is not present or contains an empt For a custom rule to run even when an attribute is empty, the rule must imply that the attribute is required. To quickly generate a new implicit rule object, you may use the `make:rule` Artisan command with the `--implicit` option: ```shell -php artisan make:rule Uppercase --invokable --implicit +php artisan make:rule Uppercase --implicit ``` > **Warning**