Skip to content

Commit c68e562

Browse files
authored
Revert digit changes (#42562)
1 parent c6d1a2d commit c68e562

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/Illuminate/Validation/Concerns/ValidatesAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ public function validateDigitsBetween($attribute, $value, $parameters)
582582

583583
$length = strlen((string) $value);
584584

585-
return ! preg_match('/[^0-9.]/', $value)
585+
return ! preg_match('/[^0-9]/', $value)
586586
&& $length >= $parameters[0] && $length <= $parameters[1];
587587
}
588588

tests/Validation/ValidationValidatorTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,12 +2284,6 @@ public function testValidateDigits()
22842284

22852285
$v = new Validator($trans, ['foo' => '+12.3'], ['foo' => 'digits_between:1,6']);
22862286
$this->assertFalse($v->passes());
2287-
2288-
$v = new Validator($trans, ['foo' => '1.2'], ['foo' => 'digits_between:1,10']);
2289-
$this->assertTrue($v->passes());
2290-
2291-
$v = new Validator($trans, ['foo' => '0.9876'], ['foo' => 'digits_between:1,5']);
2292-
$this->assertTrue($v->fails());
22932287
}
22942288

22952289
public function testValidateSize()

0 commit comments

Comments
 (0)