Skip to content

Commit b1ebdd8

Browse files
committedSep 14, 2018
FOR-1363: Fix issue with not occuring validations
1 parent 1417fb1 commit b1ebdd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/components/base/Base.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ export default class BaseComponent extends Component {
278278
* @type {boolean}
279279
*/
280280
this.pristine = true;
281+
this.component.pristine = true;
281282

282283
/**
283284
* Points to the parent component.
@@ -1659,6 +1660,7 @@ export default class BaseComponent extends Component {
16591660
flags = flags || {};
16601661
if (!flags.noValidate) {
16611662
this.pristine = false;
1663+
this.component.pristine = false;
16621664
}
16631665

16641666
// If we are supposed to validate on blur, then don't trigger validation yet.
@@ -2103,7 +2105,7 @@ export default class BaseComponent extends Component {
21032105
}
21042106

21052107
// No need to check for errors if there is no input or if it is pristine.
2106-
if (!this.hasInput || (!dirty && this.pristine)) {
2108+
if (!this.hasInput || this.root.component.components.every(comp => comp.pristine)) {
21072109
return '';
21082110
}
21092111

0 commit comments

Comments
 (0)
Please sign in to comment.