mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix alphaNumeric validation
This commit is contained in:
parent
f1d192f282
commit
14c81fe052
2 changed files with 2 additions and 1 deletions
|
@ -175,6 +175,7 @@ class ValidationTest extends CakeTestCase {
|
|||
|
||||
$this->assertFalse(Validation::alphaNumeric('12 234'));
|
||||
$this->assertFalse(Validation::alphaNumeric('dfd 234'));
|
||||
$this->assertFalse(Validation::alphaNumeric("0\n"));
|
||||
$this->assertFalse(Validation::alphaNumeric("\n"));
|
||||
$this->assertFalse(Validation::alphaNumeric("\t"));
|
||||
$this->assertFalse(Validation::alphaNumeric("\r"));
|
||||
|
|
|
@ -92,7 +92,7 @@ class Validation {
|
|||
if (empty($check) && $check != '0') {
|
||||
return false;
|
||||
}
|
||||
return self::_check($check, '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/mu');
|
||||
return self::_check($check, '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/Du');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue