diff --git a/lib/sepa.js b/lib/sepa.js index 5fb7a62..273bd17 100644 --- a/lib/sepa.js +++ b/lib/sepa.js @@ -785,6 +785,13 @@ invalidFields.push(pullFrom + 'Name'); } + try { + assert_name(name, pullFrom); + } catch (error) { + message = pullFrom + ' has invalid name: "' + name + '"'; + invalidFields.push(pullFrom + 'Name'); + } + try { assert_iban(iban, pullFrom + 'IBAN'); assert_fixed(bic.length, [0, 8, 11], pullFrom + 'BIC'); diff --git a/package.json b/package.json index 48ce41b..44248bf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Create SEPA XML for business transactions, fork of https://github.com/kewisch/sepa.js", "license": "MPL-2.0", "main": "lib/sepa.js", - "version": "1.8.0", + "version": "1.9.0", "author": "Spendesk", "repository": { "url": "https://github.com/Spendesk/sepa.js"