mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-02 17:42:41 +00:00
Merge branch 'master' into 2.4
Conflicts: lib/Cake/Console/Shell.php
This commit is contained in:
commit
041c2d289f
17 changed files with 197 additions and 72 deletions
|
@ -652,7 +652,9 @@ class Validation {
|
|||
$regex = '/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
|
||||
break;
|
||||
case 'ca':
|
||||
$regex = '/\\A\\b[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]\\b\\z/i';
|
||||
$district = '[ABCEGHJKLMNPRSTVYX]';
|
||||
$letters = '[ABCEGHJKLMNPRSTVWXYZ]';
|
||||
$regex = "/\\A\\b{$district}[0-9]{$letters} [0-9]{$letters}[0-9]\\b\\z/i";
|
||||
break;
|
||||
case 'it':
|
||||
case 'de':
|
||||
|
@ -784,7 +786,7 @@ class Validation {
|
|||
* @return boolean Success
|
||||
*/
|
||||
public static function uuid($check) {
|
||||
$regex = '/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i';
|
||||
$regex = '/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/';
|
||||
return self::_check($check, $regex);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue