? тоже больше нельзя использовать, т.к. они так же не экранируются майнкрафтом

This commit is contained in:
ErickSkrauch 2016-11-04 19:38:50 +03:00
parent 2b0023e13f
commit eb4a89174e
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ class UsernameValidator extends Validator {
$length->tooShort = E::USERNAME_TOO_SHORT;
$length->tooLong = E::USERNAME_TOO_LONG;
$pattern = new validators\RegularExpressionValidator(['pattern' => '/^[\p{L}\d-_\.!?$%^&*()\[\]:;]+$/u']);
$pattern = new validators\RegularExpressionValidator(['pattern' => '/^[\p{L}\d-_\.!$%^&*()\[\]:;]+$/u']);
$pattern->message = E::USERNAME_INVALID;
$unique = new validators\UniqueValidator();

View File

@ -45,7 +45,7 @@ class UsernameValidatorTest extends TestCase {
public function testValidateAttributePattern() {
$shouldBeValid = [
'русский_ник', 'русский_ник_на_грани!', 'numbers1132', '*__*-Stars-*__*', '1-_.!?$%^&*()[]',
'русский_ник', 'русский_ник_на_грани!', 'numbers1132', '*__*-Stars-*__*', '1-_.!$%^&*()[]',
'[ESP]Эрик', 'Свят_помидор;', роблена_ў_беларусі:)',
];
foreach($shouldBeValid as $nickname) {
@ -55,7 +55,7 @@ class UsernameValidatorTest extends TestCase {
}
$shouldBeInvalid = [
'nick@name', 'spaced nick', 'im#hashed'
'nick@name', 'spaced nick', 'im#hashed', 'quest?ion'
];
foreach($shouldBeInvalid as $nickname) {
$model = $this->createModel($nickname);