我想创建这个扩展验证。
Validator::extend('my_custom_validation_rule', function ($attribute, $value, $parameters) {
// I guess I should be setting the error message for this here.(Its dynamic)
// We can return true or false here depending upon our need.
}
我会像这样使用这个规则
'my_field' => 'required|my_custom_validation_rule'
,
我想对“ my_custom_validation_rule
”的错误使用一些动态消息
我无法从文档中找到有关它的内容。有什么办法吗?