mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 07:04:06 +09:00
- add twitch and reddit
This commit is contained in:
@@ -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' ) );
|
||||
|
||||
Reference in New Issue
Block a user