- code review;

- changed readme;
This commit is contained in:
Nikita Sinelnikov
2021-12-15 16:40:25 +02:00
parent 01a91bfb46
commit b3d9c8f989
3 changed files with 4 additions and 4 deletions
-1
View File
@@ -1025,7 +1025,6 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
'icon' => 'um-faicon-paper-plane',
'validate' => 'telegram_url',
'url_text' => 'Telegram',
'advanced' => 'social',
'match' => 'https://t.me/',
),
+3 -3
View File
@@ -285,7 +285,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
/**
* Is Discord ID
* Is Discord ID?
*
* @param $string
*
@@ -298,7 +298,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
if ( substr_count( $string, '#' ) > 1 ) {
return false;
}
if ( ! preg_match( '/(\S+)#(\d+)$/', trim( $string ) ) ) {
if ( ! preg_match( '/^(.+)#(\d+)$/', trim( $string ) ) ) {
return false;
}
return true;
@@ -417,4 +417,4 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
}
}
}
}