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

Don't you have lang files for each model?


Validation just use one lang file


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

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.


Sign in to participate in this thread!


Your banner here too?

ice winter-ice Joined 28 Aug 2019


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

Your logo here?

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

© 2024 - All rights reserved.