- add tiktok

This commit is contained in:
ashubawork
2023-01-18 13:47:07 +02:00
parent 2218ff6ba7
commit 055f7984c8
3 changed files with 27 additions and 2 deletions
+9 -2
View File
@@ -770,6 +770,13 @@ function um_submit_form_errors_hook_( $args ) {
}
break;
case 'tiktok_url':
if ( ! UM()->validation()->is_url( $args[ $key ], 'tiktok.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' ) );
@@ -878,7 +885,7 @@ function um_submit_form_errors_hook_( $args ) {
}
}
break;
case 'alphabetic':
if ( $args[ $key ] != '' ) {
@@ -886,7 +893,7 @@ function um_submit_form_errors_hook_( $args ) {
if ( ! preg_match( '/^\p{L}+$/u', str_replace( ' ', '', $args[ $key ] ) ) ) {
UM()->form()->add_error( $key, __( 'You must provide alphabetic letters', 'ultimate-member' ) );
}
}
break;