[Improvement] AddressEdit: trim empty value (#1150)

This commit is contained in:
neverland 2018-05-24 11:25:08 +08:00 committed by GitHub
parent 2fe25a288f
commit aa89f1a26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -251,7 +251,7 @@ export default create({
},
getErrorMessageByKey(key) {
const value = this.data[key];
const value = this.data[key].trim();
const { $t } = this;
switch (key) {

View File

@ -81,7 +81,7 @@ export default create({
},
getErrorMessageByKey(key) {
const value = this.data[key];
const value = this.data[key].trim();
switch (key) {
case 'name':
return value ? value.length <= 15 ? '' : this.$t('nameOverlimit') : this.$t('nameEmpty');