feat(ShowEnvelope): Logik zur Überprüfung des E-Mail-Formats hinzugefügt. Zeigt eine Fehlermeldung, wenn das Format falsch ist.
This commit is contained in:
parent
cfd08602ab
commit
f31ece3a59
@ -159,6 +159,16 @@
|
|||||||
const receiverMail_value = receiverMail.value;
|
const receiverMail_value = receiverMail.value;
|
||||||
const dateValid_value = dateValid.value;
|
const dateValid_value = dateValid.value;
|
||||||
|
|
||||||
|
//check email
|
||||||
|
if (!dateValid.classList.contains('is-invalid')) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: "error",
|
||||||
|
title: "Falsche Email",
|
||||||
|
text: "Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com."
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//check the date
|
//check the date
|
||||||
const tomorrow = new Date(Date.now() + 86400000);
|
const tomorrow = new Date(Date.now() + 86400000);
|
||||||
if (new Date(dateValid_value) < tomorrow) {
|
if (new Date(dateValid_value) < tomorrow) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user