mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Trim Email on Blur
This commit is contained in:
parent
ffab831617
commit
c2420c7525
@ -40,6 +40,9 @@
|
|||||||
<b-form-input
|
<b-form-input
|
||||||
id="input-1"
|
id="input-1"
|
||||||
v-model="form.email"
|
v-model="form.email"
|
||||||
|
v-focus="emailFocused"
|
||||||
|
@focus="emailFocused = !emailFocused"
|
||||||
|
@blur="normalizeEmail()"
|
||||||
type="email"
|
type="email"
|
||||||
placeholder="E-Mail"
|
placeholder="E-Mail"
|
||||||
style="font-size: xx-large; padding-left: 20px"
|
style="font-size: xx-large; padding-left: 20px"
|
||||||
@ -153,6 +156,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
amountFocused: false,
|
amountFocused: false,
|
||||||
|
emailFocused: false,
|
||||||
form: {
|
form: {
|
||||||
email: '',
|
email: '',
|
||||||
amount: '',
|
amount: '',
|
||||||
@ -186,6 +190,10 @@ export default {
|
|||||||
this.form.amountValue = Number(this.form.amount.replace(',', '.'))
|
this.form.amountValue = Number(this.form.amount.replace(',', '.'))
|
||||||
this.form.amount = this.$n(this.form.amountValue, 'decimal')
|
this.form.amount = this.$n(this.form.amountValue, 'decimal')
|
||||||
},
|
},
|
||||||
|
normalizeEmail() {
|
||||||
|
this.emailFocused = !this.emailFocused
|
||||||
|
this.form.email = this.form.email.trim()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user