Model Validation in laravel 5.1 not working

I am writing a rule in Model for mobile number validation this should be required, 10 digit , and must numeric. My rule is


It check up to 2nd level mean required and numeric validation but not min validation please help me to fix this.

Thank you in advance.


When validation like min/max/size are applied to numeric values, they're applied to the value, not the length. So in your case your validation makes sure that given number is larger or equal to 10.

Have a look at digits validation, it lets you define the exact number of digits a number should have:

'phone' => 'required|numeric|digits:10'
js interview questions