DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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

Top comments (0)

Thank you.

Thanks for visiting DEV, we’ve worked really hard to cultivate this great community and would love to have you join us. If you’d like to create an account, you can sign up here.