- add twitch and reddit

This commit is contained in:
ashubawork
2023-01-18 14:56:03 +02:00
parent 055f7984c8
commit 4d9f3e0341
3 changed files with 77 additions and 25 deletions
+14
View File
@@ -777,6 +777,20 @@ function um_submit_form_errors_hook_( $args ) {
}
break;
case 'twitch_url':
if ( ! UM()->validation()->is_url( $args[ $key ], 'twitch.tv' ) ) {
UM()->form()->add_error( $key, sprintf( __( 'Please enter a valid %s profile URL', 'ultimate-member' ), $array['label'] ) );
}
break;
case 'reddit_url':
if ( ! UM()->validation()->is_url( $args[ $key ], 'reddit.com' ) ) {
UM()->form()->add_error( $key, sprintf( __( 'Please enter a valid %s profile URL', 'ultimate-member' ), $array['label'] ) );
}
break;
case 'url':
if ( ! UM()->validation()->is_url( $args[ $key ] ) ) {
UM()->form()->add_error( $key, __( 'Please enter a valid URL', 'ultimate-member' ) );