Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit ef6c114

Browse files
committed
Fixing issue where validateOn does not detect multiple event names. Fixes #454
1 parent 8e524cb commit ef6c114

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/quick-start/components/user-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class UserForm extends React.Component {
6868
model={'user.checkMe'}
6969
validators={{ hasToBeTrue }}
7070

71-
validateOn={'change'}
71+
validateOn={['change', 'blur']}
7272
/>
7373
<button type="submit" disabled={!user.$form.valid}>
7474
Finish registration!

src/components/control-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function createControlClass(customControlPropsMap = {}, defaultProps = {}) {
157157
if ((validators || errors)
158158
&& fieldValue
159159
&& !fieldValue.validated
160-
&& validateOn === 'change'
160+
&& containsEvent(validateOn, 'change')
161161
) {
162162
this.validate();
163163
}

0 commit comments

Comments
 (0)