diff --git a/src/Rut.php b/src/Rut.php index ce366ff..1e5918b 100644 --- a/src/Rut.php +++ b/src/Rut.php @@ -141,7 +141,7 @@ public function number($number = null) { if ($number !== null) { - $this->number = intval($this->escape($number)); + $this->number = $this->escape($number); return $this; } return $this->number; diff --git a/tests/unit/RutTest.php b/tests/unit/RutTest.php index cbeb660..db2f927 100644 --- a/tests/unit/RutTest.php +++ b/tests/unit/RutTest.php @@ -17,7 +17,7 @@ public function testValidation() { $this->ruts = [ 'valid' => ['11.111.111-1','111111111','11111112-K','11111112-k'], - 'invalid' => ['11111112-9','1234k678-3','123-1','123.456.789-2','11.111.111-L'] + 'invalid' => ['11111112-9','17601065fail-7','123-1','123.456.789-2','11.111.111-L'] ]; /***********************