找不到 fieldName 来验证 sameAs 方法。
相同(blabla)
blabla = 'internalFormData.password'、'internalFormData.password.value'、'this.internalFormData.password'、'this.internalFormData.password.value'、'password'、'this.password'、'password.value'
-----------script----------
data () {
return {
internalFormData: {
password: '',
repassword: ''
}
}
},
validations: {
password: {
value: {
required,
minLength: minLength(8)
}
},
repassword: {
value: {
required,
minLength: minLength(8),
sameAs: sameAs('internalFormData.password')
}
}
}
},
---------------template--------------
<error
v-if="!$v.internalFormData.repassword.value.sameAs"
>
비밀번호가 일치하지 않습니다.
<error>
错误不会消失。