I am trying to submit a simple form with laravel. I have the following rule and when I enter '-100' or any other negative number, the validation fails.
'odds' => ['integer', 'digits_between:3,70'],
results in:
The odds field must be between 3 and 70 digits.
From the Laravel 11.x docs,
The integer validation must have a length between the given min and max.
Why is the validation failing when -100 is only 4 characters in length? I tried other integers such as -1000, -14000, -10, etc. and it seems like any negative integer gets rejected.
The field is also:
<input type="number" name="odds">
Would anyone have an idea why the laravel validation fails?
Also tried: ``'odds' => ['numeric', 'digits_between:3,70'],`