[L5] Nice Names Attributes - Validation Hello all!
Im working on validation form, I would like to display betters names when the user get any error, for example: Actual i have: "The user_email is required" , this is better: "The Email Address is required."
In a google search I just found this way, http://blog.ign.uy/2013/set-friendly-names-for-validation-attributes-in-laravel
But is not so cool, i'm using request to validate my form!
Thank you all.
So I did this...
'custom' => [
'email_address' => [
'required' => 'Well you need to tell us your email address :)',
],
],
but where to change in Request to use my new custom msg?
CustomRequest.php
public function rules()
{
return [
'email_address' => 'required',
];
}
@bestmomo I just tryed my form using the solution above and still nor showing the custom msg, thank you.
@luanrodriguesp - might seem like an obvious question, but did you rename the actual text field in the view to email_address?
Is it actually possible to disable the automatic underscore removal? When working on an API this is not a good thing.
Please sign in or create an account to participate in this conversation.