Skip to content

Commit

Permalink
chave pix ajuste
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardokum committed Dec 5, 2023
1 parent 4d4c03a commit 837edf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Boleto/AbstractBoleto.php
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ public function validarPix()
}
break;
case self::TIPO_CHAVEPIX_CELULAR:
if (strlen(Util::onlyNumbers($this->getPixChave())) != 11) {
if (! preg_match('/^(\+\d{2}\s?)?[-.\s]?\(?\d{2}\)?[-.\s]?(\d\s?)?\d{4}[-.\s]?\d{4}$/', $this->getPixChave())) {
throw new ValidationException(sprintf('Chave do tipo CELULAR é invalida: %s', $this->getPixChave()));
}
break;
Expand Down

0 comments on commit 837edf1

Please sign in to comment.