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

Trim whitespace in JS from emails on invoice page

This commit is contained in:
Hillel Coren 2016-04-14 10:39:12 +03:00
parent b51cea769f
commit f75b67b704

View File

@ -98,7 +98,13 @@ function ViewModel(data) {
var isValid = true;
$('input.client-email').each(function(item, value) {
var $email = $(value);
var email = $(value).val();
// Trim whitespace
email = (email || '').trim();
$email.val(email);
if (!firstName && (!email || !isValidEmailAddress(email))) {
isValid = false;
}