Error in Laravel 5.7 validation messages

Asked

Viewed 170 times

0

I am working with Laravel validation messages, but always this returning me "validation.min.string", I stopped importing something?

Controller

$this->validate($request, [
        'telefone' => 'required|min:10|max:15'
    ], [
        'telefone.required'=>'Este campo é obrigatório'
    ]);

Alerts.blade.php

@if($errors->any())
<div class="alert alert-danger">
    @foreach($errors->all() as $error)
        <p>{{ $error }}</p>
    @endforeach
</div>
@endif

View

@include('includes.alerts')

where I’m failing to do something?

Thanks in advance!

  • 1

    Take a look here https://www.youtube.com/watch?time_continue=372&v=OUzAfCXwbSA

  • It worked @Cesarvinicius Thanks!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.