Skip to content

Commit cd5293a

Browse files
committed
[2.1.0] Added asyncValidators to every Form Control
1 parent 2f01171 commit cd5293a

21 files changed

+99
-29
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.1.0
2+
3+
### Added
4+
5+
- `asyncValidators` property to every Form Control
6+
- They will validate only if there is no sync errors or sync validators
7+
18
## 2.0.0
29

310
### BREAKING CHANGES

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ See demo at [https://detools.github.io/vue-form](https://detools.github.io/vue-f
7878

7979
## Changelog
8080

81+
- [2.1.0](/CHANGELOG.md#210)
8182
- [2.0.0](/CHANGELOG.md#200)
8283
- [1.5.0](/CHANGELOG.md#150)
8384
- [1.4.4](/CHANGELOG.md#144)

VueForm/ConnectedCheckbox.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default {
2525
indeterminate: String,
2626

2727
validators: Array,
28+
asyncValidators: Array,
2829

2930
handleFocus: {
3031
type: Function,
@@ -49,7 +50,7 @@ export default {
4950
data() {
5051
const $registerFormComponent = resolveRegisterFormComponent(this)
5152

52-
return $registerFormComponent(this.name, this.value, this.validators)
53+
return $registerFormComponent(this.name, this.value, this.validators, this.asyncValidators)
5354
},
5455

5556
destroyed() {

VueForm/ConnectedCheckboxGroup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default {
4444
border: Boolean,
4545

4646
validators: Array,
47+
asyncValidators: Array,
4748

4849
handleFocus: {
4950
type: Function,
@@ -79,7 +80,7 @@ export default {
7980
initialValue = castArray(initialValue)
8081
}
8182

82-
return $registerFormComponent(this.name, initialValue, this.validators)
83+
return $registerFormComponent(this.name, initialValue, this.validators, this.asyncValidators)
8384
},
8485

8586
destroyed() {

VueForm/ConnectedDatePicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export default {
7373
clearIcon: String,
7474

7575
validators: Array,
76+
asyncValidators: Array,
7677

7778
handleFocus: {
7879
type: Function,
@@ -98,7 +99,7 @@ export default {
9899
data() {
99100
const $registerFormComponent = resolveRegisterFormComponent(this)
100101

101-
return $registerFormComponent(this.name, this.value, this.validators)
102+
return $registerFormComponent(this.name, this.value, this.validators, this.asyncValidators)
102103
},
103104

104105
destroyed() {

VueForm/ConnectedInput.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default {
3838
tabindex: Number,
3939

4040
validators: Array,
41+
asyncValidators: Array,
4142

4243
handleFocus: {
4344
type: Function,
@@ -64,7 +65,7 @@ export default {
6465
const $registerFormComponent = resolveRegisterFormComponent(this)
6566

6667
return {
67-
...$registerFormComponent(this.name, this.value, this.validators),
68+
...$registerFormComponent(this.name, this.value, this.validators, this.asyncValidators),
6869
touched: false,
6970
}
7071
},

VueForm/ConnectedInputNumber.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default {
2525
controlsPosition: String,
2626

2727
validators: Array,
28+
asyncValidators: Array,
2829

2930
handleFocus: {
3031
type: Function,
@@ -50,7 +51,7 @@ export default {
5051
data() {
5152
const $registerFormComponent = resolveRegisterFormComponent(this)
5253

53-
return $registerFormComponent(this.name, this.value, this.validators)
54+
return $registerFormComponent(this.name, this.value, this.validators, this.asyncValidators)
5455
},
5556

5657
destroyed() {

VueForm/ConnectedRadio.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default {
1717
size: String,
1818

1919
validators: Array,
20+
asyncValidators: Array,
2021

2122
handleFocus: {
2223
type: Function,
@@ -41,7 +42,7 @@ export default {
4142
data() {
4243
const $registerFormComponent = resolveRegisterFormComponent(this)
4344

44-
return $registerFormComponent(this.name, this.value, this.validators)
45+
return $registerFormComponent(this.name, this.value, this.validators, this.asyncValidators)
4546
},
4647

4748
destroyed() {

VueForm/ConnectedRadioGroup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default {
3838
border: Boolean,
3939

4040
validators: Array,
41+
asyncValidators: Array,
4142

4243
handleFocus: {
4344
type: Function,
@@ -63,7 +64,7 @@ export default {
6364
data() {
6465
const $registerFormComponent = resolveRegisterFormComponent(this)
6566

66-
return $registerFormComponent(this.name, this.value, this.validators)
67+
return $registerFormComponent(this.name, this.value, this.validators, this.asyncValidators)
6768
},
6869

6970
destroyed() {

VueForm/ConnectedSelect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default {
6262
automaticDropdown: Boolean,
6363

6464
validators: Array,
65+
asyncValidators: Array,
6566

6667
handleFocus: {
6768
type: Function,
@@ -98,7 +99,7 @@ export default {
9899
}
99100
}
100101

101-
return $registerFormComponent(this.name, initialValue, this.validators)
102+
return $registerFormComponent(this.name, initialValue, this.validators, this.asyncValidators)
102103
},
103104

104105
destroyed() {

0 commit comments

Comments
 (0)