diff --git a/packages/shared-components/src/formio/components/base/BaseComponent.ts b/packages/shared-components/src/formio/components/base/BaseComponent.ts index 22d0b7941..86c44e4b8 100644 --- a/packages/shared-components/src/formio/components/base/BaseComponent.ts +++ b/packages/shared-components/src/formio/components/base/BaseComponent.ts @@ -226,6 +226,16 @@ class BaseComponent extends FormioReactComponent { this.rerender(); } + setComponentValidity(messages, dirty, silentCheck) { + if (messages.length && (!silentCheck || this.error) && this.showErrorMessages()) { + this.setCustomValidity(messages, dirty); + } else { + this.setCustomValidity(''); + } + + return this.componentErrors.length === 0; + } + createError(message: string, elementId?: string): ComponentError { return { message,