i’m a newby in laravel , i’m trying to validate a certain field from my input request using the max:value rule , the thing is that the value is neither a static value nor a field in my request input , its a value that i retrieve from my database and stored in a variable $available , whenever i try ( ‘count’ => required|numeric|max:$available ) the validation always fails on max as if it cannot evaluate that variable $available , however when i try to use a static value which is not the case (e.g ‘count’ => required|numeric|max:5 ) it works just fine , i also tried to merge $available with the input fields of my request before validation using “ $request->merge(['availableCount' =>$availableRoom->count]); “ and then i tried to use the field ‘availableCount’ in my rule instead of the variable (e.g ‘count’ => required|numeric|max:availableCount) the validation never fails and it always proceeds with the controller logic !! what did i do wrong or what am i supposed to do ?! Thanks.