Skip to content

Commit

Permalink
Fix alphaNumeric validation
Browse files Browse the repository at this point in the history
  • Loading branch information
yuya-takeyama committed Mar 14, 2013
1 parent f1d192f commit 14c81fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Utility/ValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ public function testAlphaNumeric() {

$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"));
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static function alphaNumeric($check) {
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');
}

/**
Expand Down

0 comments on commit 14c81fe

Please sign in to comment.