DEV Community

Morcos Gad
Morcos Gad

Posted on

Allow validator messages to use nested arrays - Laravel

In the new version 9.28 we have the feature Allow validator messages to use nested arrays So that the handling of writing error messages is more organized and smells to the eye .

https://github.com/laravel/framework/pull/43981

[
   'attribute.rule1' => 'message1',
   'attribute.rule2' => 'message2',
   'attribute.rule3' => 'message3',
   'attribute.rule4' => 'message4',
   'attribute.rule5' => 'message5',
]

// Now 

[
   'attribute' => [
       'rule1' => 'message1',
       'rule2' => 'message2',
       'rule3' => 'message3',
       'rule4' => 'message4',
       'rule5' => 'message5',
    ]
]
Enter fullscreen mode Exit fullscreen mode

I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.

Source :- https://www.youtube.com/watch?v=DKd560Ps6xo
Source :- https://laravel-news.com/laravel-9-28-0

Oldest comments (0)