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
Hi, I'm not sure if this is a bug or unsupported functionality (or if it's possible I'm just doing something wrong), but as far as I can tell, custom Laravel validation does not work. I am on statamic 4.55.0 and meerkat 3.1.1
As a reproducible example, I followed the statamic and laravel docs in defining a custom Uppercase validation rule and referenced it in the meerkat blueprint yaml:
handle: email
field:
type: text
display: Email
validate:
- required
- email
- new App\Rules\Uppercase
Then, when I attempt to submit a comment, it throws an error: ERROR: Method Illuminate\Validation\Validator::validateNewApp\Rules\Uppercase does not exist.
I confirmed that the same validation rule class worked with other (non-meerkat related) blueprints in my control panel.
My real use case for custom validation rules is that I am trying to prevent guest commenters from using email addresses that look like those of site administrators.
The text was updated successfully, but these errors were encountered:
Hey there! I'll have to take a look to see if there is anything special I need to do on my end to also support this, as I haven't used the new validation rule style yet personally.
Thanks! And does that mean the old Rule interface would work for this for now? I'm actually coming from the opposite side (never having used the the old style rule personally).
An update on this one. I'm going to delay this change until Meerkat 4 since it ended up being quite a significant change to how the underlying form handler works.
Hi, I'm not sure if this is a bug or unsupported functionality (or if it's possible I'm just doing something wrong), but as far as I can tell, custom Laravel validation does not work. I am on statamic 4.55.0 and meerkat 3.1.1
As a reproducible example, I followed the statamic and laravel docs in defining a custom
Uppercase
validation rule and referenced it in the meerkat blueprint yaml:Then, when I attempt to submit a comment, it throws an error:
ERROR: Method Illuminate\Validation\Validator::validateNewApp\Rules\Uppercase does not exist.
I confirmed that the same validation rule class worked with other (non-meerkat related) blueprints in my control panel.
My real use case for custom validation rules is that I am trying to prevent guest commenters from using email addresses that look like those of site administrators.
The text was updated successfully, but these errors were encountered: