この拡張検証を作成したかったのです。
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
" "のエラーに動的メッセージを使用したい
それに関するドキュメントから何かを見つけることができませんでした。とにかくそれを行うことはありますか?