Validate newsletter email before activation

This commit is contained in:
2026-08-03 16:55:29 +02:00
parent 26764625ac
commit 51fc9b87e0
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -208,6 +208,7 @@
type="email"
placeholder="E-Mail-Adresse"
aria-label="E-Mail-Adresse"
required
>
</div>
@@ -235,7 +236,7 @@
}
const updateProcessButtonState = () => {
const isActive = input.value.trim().length > 0;
const isActive = input.checkValidity();
processButton.disabled = !isActive;
processButton.setAttribute('aria-disabled', String(!isActive));
processButton.setAttribute('data-component-state', isActive ? 'active' : 'inactive');