- added a discord field (issue #926)

This commit is contained in:
ashubawork
2021-12-13 12:52:36 +02:00
parent 4e90ec5502
commit ff18aa5ec7
3 changed files with 38 additions and 0 deletions
+6
View File
@@ -758,6 +758,12 @@ function um_submit_form_errors_hook_( $args ) {
}
break;
case 'discord':
if ( ! UM()->validation()->is_discord_id( $args[ $key ] ) ) {
UM()->form()->add_error( $key, __( 'Please enter a valid Discord ID', 'ultimate-member' ) );
}
break;
case 'url':
if ( ! UM()->validation()->is_url( $args[ $key ] ) ) {
UM()->form()->add_error( $key, __( 'Please enter a valid URL', 'ultimate-member' ) );