Merge pull request #2843 from brkcvn/master

Unworked code ejected from regex
This commit is contained in:
Burak Civan 2022-12-21 11:19:22 +03:00 committed by GitHub
commit 4524c409b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -818,9 +818,9 @@ const app = new Vue({
return;
}
if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) {
this.form.discount = oldVal;
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
this.form.discount.replace(',', '.');
return;
}
@ -834,7 +834,7 @@ const app = new Vue({
}
}
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
this.form.discount.replace(',', '.');
},
'form.loading': function (newVal, oldVal) {