You have it schoolSeatsTotalas a string. For string data, the maximum value corresponds to the number of characters. Instead, you want to check for an integer.
So change
$input = ["schoolSeatsTotal" => '2000'];
to
$input = ["schoolSeatsTotal" => 2000];
To make sure you check the numbers, do the following:
$rules = ['schoolSeatsTotal'=>'numeric|max:300'];
source
share