Support the ongoing development of Laravel.io →
Validation Laravel
Last updated 2 years ago.
0

Don't you have lang files for each model?

0

Validation just use one lang file

0

So you'll have to use either of the following:

  1. If you're doing validations in the controller, i.e. $this->validate($request, [...]) you can use the custom error messages
  2. If you're using form requests, you have the attributes() function to help you
  3. If the app is still in dev, you can rename the fields so the English will corresponde the Chinese word
0

Actually I'm using Laravel Nova and It's not provide a method to define custom error messages or custom attributes. So I have try to find another way.

Looks like is Nova's issue.

By the way,I think the good way to resolve this issue is handle it in Lang files.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ice winter-ice Joined 28 Aug 2019

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.