mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Improvement] AddressEdit: trim empty value (#1150)
This commit is contained in:
parent
2fe25a288f
commit
aa89f1a26c
@ -251,7 +251,7 @@ export default create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getErrorMessageByKey(key) {
|
getErrorMessageByKey(key) {
|
||||||
const value = this.data[key];
|
const value = this.data[key].trim();
|
||||||
const { $t } = this;
|
const { $t } = this;
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
|
@ -81,7 +81,7 @@ export default create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getErrorMessageByKey(key) {
|
getErrorMessageByKey(key) {
|
||||||
const value = this.data[key];
|
const value = this.data[key].trim();
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'name':
|
case 'name':
|
||||||
return value ? value.length <= 15 ? '' : this.$t('nameOverlimit') : this.$t('nameEmpty');
|
return value ? value.length <= 15 ? '' : this.$t('nameOverlimit') : this.$t('nameEmpty');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user