mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #1177 from yuya-takeyama/fix-alphaNumeric-validation
Fix alphaNumeric validation
This commit is contained in:
commit
60f9131940
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