feat(Form): resetValidation support multiple names (#7811)

This commit is contained in:
neverland
2020-12-24 20:19:00 +08:00
committed by GitHub
parent d92d29c885
commit 1fac5c5f4f
5 changed files with 24 additions and 8 deletions
+13
View File
@@ -104,6 +104,19 @@ test('resetValidation method - reset all fields', (done) => {
});
});
test('resetValidation method - reset two fields', (done) => {
const wrapper = mountSimpleRulesForm({
mounted() {
this.$refs.form.validate().catch(() => {
this.$refs.form.resetValidation(['A', 'B']);
const errors = wrapper.findAll('.van-field__error-message');
expect(errors.length).toEqual(0);
done();
});
},
});
});
test('resetValidation method - reset one field', (done) => {
const wrapper = mountSimpleRulesForm({
mounted() {