Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate property "error_message" #523

Open
marciofornari opened this issue Apr 17, 2019 · 1 comment
Open

Translate property "error_message" #523

marciofornari opened this issue Apr 17, 2019 · 1 comment

Comments

@marciofornari
Copy link

marciofornari commented Apr 17, 2019

Hello,
Can i have translate the property "error_message" on the form?

$this
            ->add('nome', 'text',
                [
                    'label' => 'Nome Paciente',
                    'rules' => 'required|min:5',
                    'error_messages' => [
                        'nome.required' => 'Nome não pode ficar em branco.'
                    ]
                ]
            )

Error:
image

FORM HTML:

<div class="form-group">   
    <label for="nome" class="control-label required">Nome Paciente</label>
    <input class="form-control" required="required" minlength="5" name="nome" type="text" id="nome">
        </div>
@rudiedirkx
Copy link
Collaborator

Works for me. Maybe the "Fill out this field" is your browser's? My browser says "Please fill in this field". Normal Laravel includes the field name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants