Trim whitespace in JS from emails on invoice page
This commit is contained in:
parent
b51cea769f
commit
f75b67b704
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue