laravel-validator icon indicating copy to clipboard operation
laravel-validator copied to clipboard

Max and min validation is not working properly

Open mhetreramesh opened this issue 9 years ago • 2 comments

I have to validate user phone number which should only be 10 digits, so I have added following validation, but this is not working. I'm missing something or this is the bug?

'phone_number' => 'required|numeric|min:10|max:10',

mhetreramesh avatar Sep 20 '16 11:09 mhetreramesh

'phone_number' => 'required|integer|between:1,10'

pensart avatar Nov 13 '16 16:11 pensart

I have the same issue with this:

'price' => 'required_if:has_price,yes|min:1',

aminraeisi avatar Jun 19 '17 14:06 aminraeisi