0

I need allow double values. How I can do it? I need allow, doubles like this:

- 1,22
- 0,01
- 2,33

I can validate with numeric:

$request->validate(['from' => 'required|numeric']);

But then I can write 1,32223, 22,3322 and others. I need allow only 2 number after comma.

Mafys Grif
  • 557
  • 3
  • 13
  • 30

1 Answers1

0

Take a look at this question. Seems like you can use the between validation rule as follows

numeric|between:0,99.99
PtrTon
  • 3,705
  • 2
  • 14
  • 24