mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[Improvement] AddressEdit: trim empty value (#1150)
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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');
|
||||
|
Reference in New Issue
Block a user