mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed required field "image". Does not work check, if you delete the previously uploaded image when you update the profile again
This commit is contained in:
@@ -269,12 +269,12 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
if ( isset( $args[$key] ) ) {
|
||||
|
||||
if ( isset( $array['required'] ) && $array['required'] == 1 ) {
|
||||
if ( ! isset( $args[$key] ) || $args[$key] == '' ) {
|
||||
if( empty( $array['label'] ) ) {
|
||||
UM()->form()->add_error($key, __('This field is required','ultimate-member') );
|
||||
} else {
|
||||
UM()->form()->add_error($key, sprintf( __('%s is required','ultimate-member'), $array['label'] ) );
|
||||
}
|
||||
if ( ! isset( $args[$key] ) || $args[$key] == '' || $args[$key] == 'empty_file') {
|
||||
if( empty( $array['label'] ) ) {
|
||||
UM()->form()->add_error($key, __('This field is required','ultimate-member') );
|
||||
} else {
|
||||
UM()->form()->add_error($key, sprintf( __('%s is required','ultimate-member'), $array['label'] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user