I am working with some forms but I have the problem that when validating from the backend with the FormRequest it does not work for me to enter decimal values up to the range that I need, currently I have it like this:
"numberdecimal" => "required|numeric|between:0,99.99",
For a reason that I do not understand, it does not let me add values greater than 1 integer, what I need is that it allows me to add values between 0.10000 and 100.0000, I mean between zero and one hundred, but clearly with decimals
How should I do it?
I tried this way but it keeps returning an error...
"numberdecimal" => "required|numeric|between:0.0,100",
Currently it is returning this error
local.ERROR: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'numberdecimal' at row 1 (SQL: update `my_table` set `numberdecimal` = 10.9999
Well, the truth is that my code is fine, revising more thoroughly and doing tests I realize that my error was in my column of my table, I had it as
decimal(4,4)
and I have passed it todecimal(8,4)
with this I solved the problem, if I am not wrong I am not mistaken is that the maximum lake of digits will be 8 and with 4 of them as decimals! If I'm wrong, please correct me on this detail.and well if it helps someone, here are more details Working with decimals in mysql