1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Fix JS validation

This commit is contained in:
Hillel Coren 2017-03-09 15:25:52 +02:00
parent bc4468dcfb
commit f67d508dcc

View File

@ -1464,7 +1464,7 @@
} }
function isSaveValid() { function isSaveValid() {
var isValid = model.invoice().client().name ? true : false; var isValid = model.invoice().client().name() ? true : false;
for (var i=0; i<model.invoice().client().contacts().length; i++) { for (var i=0; i<model.invoice().client().contacts().length; i++) {
var contact = model.invoice().client().contacts()[i]; var contact = model.invoice().client().contacts()[i];
if (isValidEmailAddress(contact.email()) || contact.first_name() || contact.last_name()) { if (isValidEmailAddress(contact.email()) || contact.first_name() || contact.last_name()) {