You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure how to put in a request to fix a docs illustration, since I don't have the tools to make a new illustration.
In the Custom Validation Rules docs the illustration fails to show the App\Rules\ prefix that should go on any custom rule, even when defining it in the CP. This prefix is shown in the YAML example, but by not appearing in the CP example it strongly implies the prefix is only needed in the YAML.
Wrong, the prefix is needed in the CP as well. I just spent half an hour fumbling to learn this. It would be nice if the illustration were fixed.
Thanks!
The text was updated successfully, but these errors were encountered:
Well, since the example starts by pointing to the Laravel docs, and the Laravel docs use php artisan make:rule and that tool puts the rule in /app/Rules, I think it would be best for the example to include the /App/Rules in the illustration. Glad you agree! :)
However, until right now I had not really realized this was due to the namespace and not the filesystem. It is that make:rule sets up the rule in namespace App\Rules that is the issue here, I think.
So maybe the docs could be a bit more explicit, saying something like, "don't forget to include any namespace prefix your rule may require." I imagine a lot of Statamic users are, like me, new to Laravel and not even all that familiar with concepts like namespaces. Little reminders would go a long way toward bringing us along.
Not sure how to put in a request to fix a docs illustration, since I don't have the tools to make a new illustration.
In the Custom Validation Rules docs the illustration fails to show the
App\Rules\
prefix that should go on any custom rule, even when defining it in the CP. This prefix is shown in the YAML example, but by not appearing in the CP example it strongly implies the prefix is only needed in the YAML.Wrong, the prefix is needed in the CP as well. I just spent half an hour fumbling to learn this. It would be nice if the illustration were fixed.
Thanks!
The text was updated successfully, but these errors were encountered: