Skip to content

Commit 4e8973e

Browse files
authored
Merge pull request #14 from joseluisr0307/master
update regex for payment description
2 parents 5c83675 + 52f0bff commit 4e8973e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Validators/BaseValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class BaseValidator
99
{
1010
const PATTERN_REFERENCE = '/^[\d\w\-\.,\$#\/\\\'!]{1,32}$/';
11-
const PATTERN_DESCRIPTION = '/^[a-zñáéíóúäëïöüàèìòùÑÁÉÍÓÚÄËÏÖÜÀÈÌÒÙÇçÃã\'\.\,\&\-\#\_\s\d\(\)]{2,250}$/i';
11+
const PATTERN_DESCRIPTION = '/^[a-zñáéíóúäëïöüàèìòùÑÁÉÍÓÚÄËÏÖÜÀÈÌÒÙÇçÃã\s\d\.,\$#\&\-\_(\)\/\%\+\\\']{2,250}$/i';
1212

1313
public static function isValidIp($ip)
1414
{

tests/Validators/PaymentValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testItPassesWhenDescriptionOk()
103103
{
104104
$data = [
105105
'reference' => '1234567890',
106-
'description' => 'Pago de prueba para la factura #2321 con ref. 43242342-3424_32.',
106+
'description' => 'Pago de prueba para la factura #2321 con ref. 43242342-3424_32. ($50.000) 25/feb',
107107
'amount' => [
108108
'currency' => 'COP',
109109
'total' => 1000

0 commit comments

Comments
 (0)