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

easy enough. At the bottom of app/lang/en/validation.php add an entry to the attributes array like 'email' => 'Email address'

hope this helps

Last updated 2 years ago.
0

What if you only would want to apply it to a specific form?

Use unique names in that form?

Last updated 2 years ago.
0

ivermoller said:

What if you only would want to apply it to a specific form?

Use unique names in that form?

Since the file is global, I thnk so. I've found lot of discussions about this, like extending the validation class,.. but this is the easiest way. And yes, I would use unique names, but usually 'email' always show as 'Email address' so there's no point having 'fomxxx_email' to distinguish fields.. Side note: I just created a multilanguage site and used something like 'email' => trans('profile.email') in the various language validation files. Then in the lang/[en,it,fr]/profile.php files, you can adapt your translations

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

beeyev beeyev Joined 29 Aug 2014

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.