in simple use rules of laravel validator i want to check input for between 1 and 10.
this below role do not work correctly and accept zero
'display_post_count' => 'required|min:1|max:10',
You seem to be using
digits_between but you need to be using just
'item' => 'required|integer|between:1,10',
You should use digits_between when you are trying to get exact same “length”. for example to validate if user input is a digit between 0 to 99, you just add “digits_between:1,2” in your validation.
'item' => 'required|digits_between:1,2',
If your number is decimal, and want to validate if entered number is a range number between 1, 1.1, 1.2, 1.3, … to 2, you need use “numeric|between:1,2” in your validation.
'item' => 'required|numeric|between:1,2',