mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- added a discord field (issue #926)
This commit is contained in:
@@ -284,6 +284,24 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is Discord ID
|
||||
*
|
||||
* @param $string
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_discord_id( $string ) {
|
||||
if ( ! $string ) {
|
||||
return true;
|
||||
}
|
||||
if ( ! preg_match( '/(^\S+)#(\d+)$/', trim( $string ) ) ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is url
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user