- wpcs;
This commit is contained in:
Mykyta Synelnikov
2023-11-21 15:28:20 +02:00
parent 57fc9fda0a
commit 5d750f35dc
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -514,7 +514,7 @@ function um_submit_form_errors_hook_( $submitted_data, $form_data ) {
}
// Validate the Required condition for the Number field. Set the Minimum Number option to allow 0 value.
if ( isset( $array['type'] ) && 'number' === $array['type'] && ! isset( $array['min'] ) && ! empty( $array['required'] ) && empty( $submitted_data[ $key ] ) ) {
if ( isset( $array['type'] ) && 'number' === $array['type'] && ! empty( $array['required'] ) && '' === $submitted_data[ $key ] ) {
// translators: %s: title.
UM()->form()->add_error( $key, sprintf( __( '%s is required.', 'ultimate-member' ), $array['title'] ) );
}