We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 354642f commit 05520d2Copy full SHA for 05520d2
www/cart/order.js
@@ -382,9 +382,13 @@ function submitInvoice() {
382
element.focus();
383
return false;
384
}
385
- if ( name === 'tax_no' && element.value.length < 10 ) {
386
- element.focus();
387
- return false;
+ if ( name === 'tax_no' ) {
+ var taxno = element.value.replaceAll(' ', '').replaceAll('-', '');
+ var taxPattern = /^[a-zA-Z0-9]{18}$/;
388
+ if (! taxPattern.test( taxno ) ) {
389
+ element.focus();
390
+ return false;
391
+ }
392
393
if ( name === 'tax_name' && element.value.length < 4 ) {
394
0 commit comments