mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-29 10:02:27 +03:00
Validate email address only when it's set
This commit is contained in:
parent
227612565d
commit
ae171b3ffb
1 changed files with 1 additions and 1 deletions
|
@ -626,7 +626,7 @@ App.Components.AppointmentsModal = (function () {
|
|||
}
|
||||
|
||||
// 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');
|
||||
throw new Error(lang('invalid_email'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue