Open jonassiewertsen opened 4 years ago
What about if you use a string for your validation rules, instead of passing it in an array.
This should be the appropriate way to register the rule, otherwise Statamic does not know where to find the rule.
This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.
This should still be an issue.
This is more of a feature request.
Right now, a blueprint needs to be representable in YAML. You can't plop a PHP class based validation rule in YAML.
I'll move the to ideas repo.
In addon context, I am creating a blueprint on the fly. This might look something like this:
It seems that the rule won't be recognized at all by the blueprint and therefore not taking any effect.
My custom rule will always pass, even when explicit returning false.
Environment
Statamic version: 3.0.0.-beta-33
PHP version: 7.4
Install method (choose one):
statamic/statamic
with own addon