diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue index 8ef86772..b2e5195f 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue @@ -420,8 +420,15 @@ validateInput () { let messages = []; this.invalidParticipantData = {}; + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ for (let participant of this.participantData) { let participantId = participant.data.id; + if (!emailPattern.test(participant.data.email)) { + this.invalidParticipantData[participantId] = { + invalid: 'E-Mail', + }; + messages.push('Teilnehmer #'+participantId+': ungültige E-Mail-Adresse') + } if (!participant.data.nationality) { this.invalidParticipantData[participantId] = { invalid: 'Nationalität', diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantDataForm.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantDataForm.vue index 61b4ea44..8f7dcc98 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantDataForm.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantDataForm.vue @@ -14,7 +14,7 @@ >