Remove deprecated validation rules
This commit is contained in:
parent
7eaf166063
commit
d867b0921b
|
|
@ -45,28 +45,6 @@ class ValidatorExtendServiceProvider extends ServiceProvider
|
|||
|
||||
return preg_match($regexp, $value);
|
||||
});
|
||||
|
||||
$this->registerExpiredRules();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register these for the compatibility with plugins using old rules.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerExpiredRules()
|
||||
{
|
||||
Validator::extend('nickname', function ($a, $value, $p, $v) {
|
||||
return $value === e(addslashes(trim($value)));
|
||||
});
|
||||
|
||||
Validator::extend('playername', function ($a, $value, $p, $v) {
|
||||
return preg_match('/^([A-Za-z0-9_]+)$/', $value);
|
||||
});
|
||||
|
||||
Validator::extend('pname_chinese', function ($a, $value, $p, $v) {
|
||||
return preg_match('/^([A-Za-z0-9_\x{4e00}-\x{9fff}]+)$/u', $value);
|
||||
});
|
||||
}
|
||||
|
||||
public function register()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user