Fixed email for key creation validating

pull/143/head
parent d1ee45c84d
commit 2e7b4a80c9
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -16,7 +16,7 @@ void on_key_generate_accept(GtkWidget *self, key_creation_window* window){
yon_ubl_status_highlight_incorrect(window->NameEntry); yon_ubl_status_highlight_incorrect(window->NameEntry);
return; return;
} }
if (!yon_char_is_empty(email)&&!g_regex_match_simple("^(?!\\.)\\S+@\\S+.[^.]\\S+",email,0,0)){ if (!yon_char_is_empty(email)&&!g_regex_match_simple("^(?!.*[@.]{2})(?!^[@.])[^@.]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",email,0,0)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMAIL_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMAIL_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->EmailEntry); yon_ubl_status_highlight_incorrect(window->EmailEntry);
return; return;

Loading…
Cancel
Save