I want to validate the length of a float number, not the value itself I am talking about the length. The length should be max 9.
Examples:
0 OK
0.00 OK
5 OK
20 OK
100 OK
4000 OK
100000 OK
100000000 OK
100000000,00 OK
1000000000 NO its 10 digits long
Please note, if the number contains decimals they should not count!
This is what I have tried so far:
max:9this always results in validating the value instead of the length of the numberdigits_between:0,9always returns inThe price old must be between 0 and 9 digits.even tho the value is12.51which I don't getsizewill not work for me because it's a fixed length
Any ideas on how to solve this? I don't get why digits_between:0,9 is not working even though the documentation is saying length instead of value (Quote: The field under validation must have a length between the given min and max.).
I am using Laravel 8.
Kind regards