Closed peterfox closed 7 months ago
It would be neat to automatically configure validation rules that are in the single string format to become arrays.
e.g.
Validator::make($data, [ - 'field' => 'required|nullable|string|max:255', + 'field' => ['required', 'nullable', 'string', 'max:255'], ]);
This rule will also work with the Validator facade and classes that extend the FormRequest class and have a rules method.
Changes
Why
It would be neat to automatically configure validation rules that are in the single string format to become arrays.
e.g.
This rule will also work with the Validator facade and classes that extend the FormRequest class and have a rules method.