- fixed discord field validation

This commit is contained in:
ashubawork
2021-12-15 13:18:41 +02:00
parent ea8ce49698
commit 01a91bfb46
+4 -1
View File
@@ -295,7 +295,10 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
if ( ! $string ) {
return true;
}
if ( ! preg_match( '/(^\S+)#(\d+)$/', trim( $string ) ) ) {
if ( substr_count( $string, '#' ) > 1 ) {
return false;
}
if ( ! preg_match( '/(\S+)#(\d+)$/', trim( $string ) ) ) {
return false;
}
return true;