dimanche 6 juin 2021

Laravel - Validation locale not taking {lang}.json value

current code:

// lang/id/validation.php

return [
  'required' => __(":Attribute") . " wajib diisi.",
]

// lang/id.json
{
    "Password": "Kata Sandi"
}

If the password validation failed, it always return Password wajib diisi how can I take the password value from id.json to become Kata Sandi (I already make sure the language is ID)?

I know its possible to use the "custom" on validation.php, but it will be so many redudant.

Thanks.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire