refactor(posts): drop hardcoded English validation messages

Removes the messages() override on UpdatePostRequest. The 4 messages it
defined were hardcoded English strings that bypassed Laravel's built-in
validation translations. With the override gone, errors flow through
lang/{locale}/validation.php which is already translated for en/pt-BR/es.
Trade-off: default messages reference the field path (e.g.
'platforms.0.content_type'). Acceptable here because the editor renders
errors inline next to each field rather than as a flat list.
This commit is contained in:
Paulo Castellano 2026-05-09 13:58:09 -03:00
parent c5e667f92a
commit b322a7074f

View file

@ -72,16 +72,6 @@ public function rules(): array
];
}
public function messages(): array
{
return [
'status.required' => 'The post status is required.',
'status.in' => 'Invalid post status.',
'platforms.*.content_type.in' => 'Invalid content type.',
'scheduled_at.after' => 'The scheduled date must be in the future.',
];
}
public function withValidator(Validator $validator): void
{
$validator->after(function ($validator): void {