Merge pull request #1243 from JanC/1231-email-validation
[1231] Validate appointment email only when set
This commit is contained in:
commit
0742b275ef
1 changed files with 1 additions and 1 deletions
|
@ -626,7 +626,7 @@ App.Components.AppointmentsModal = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check email address.
|
// Check email address.
|
||||||
if (!App.Utils.Validation.email($appointmentsModal.find('#email').val())) {
|
if ($appointmentsModal.find('#email').val() && !App.Utils.Validation.email($appointmentsModal.find('#email').val())) {
|
||||||
$appointmentsModal.find('#email').addClass('is-invalid');
|
$appointmentsModal.find('#email').addClass('is-invalid');
|
||||||
throw new Error(lang('invalid_email'));
|
throw new Error(lang('invalid_email'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue