diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue
index 03fc08a92..5fad059fb 100644
--- a/frontend/src/components/Contributions/ContributionForm.vue
+++ b/frontend/src/components/Contributions/ContributionForm.vue
@@ -51,13 +51,11 @@
-
+
@@ -106,10 +104,10 @@ export default {
},
methods: {
numberFormat(value) {
- return (this.form.amount = value.replace(/\.|,/, ''))
+ return value.replace(/\D/g, '')
},
submit() {
- this.numberFormat(this.form.amount)
+ this.form.amount = this.numberFormat(this.form.amount)
if (this.form.id) {
this.$emit('update-contribution', this.form)
} else {
@@ -137,8 +135,8 @@ export default {
if (
this.form.date === '' ||
this.form.memo.length < this.minlength ||
- this.form.amount <= 0 ||
- this.form.amount > 1000 ||
+ parseInt(this.form.amount) <= 0 ||
+ parseInt(this.form.amount) > 1000 ||
(this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddThisMonth)) ||
(!this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddLastMonth))
)