samedi 25 août 2018

Laravelv alidator::validateString|max does not exist Error

In my Laravel 5.6.33 application I need to check dimention of an uploaded file with rule

    'avatar' => [
        'string|max:50',
        Rule::dimensions()->maxWidth(96)->maxHeight(64)->ratio(3 / 2),
    ],

But I got error:

Method Illuminate\Validation\Validator::validateString|max does not exist.

In declarations of rules I added a line:

use Illuminate\Validation\Rule;

But I have the error anyway...

What did I miss ?

Thanks!



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2P4anRu
via IFTTT

Aucun commentaire:

Enregistrer un commentaire