Skip to content

Commit

Permalink
Adding other scope options to the processors.
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Nov 18, 2024
1 parent 7fb789c commit 6ff4457
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/_classes/component/Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { processOne, processOneSync, validateProcessInfo } from '@formio/core/pr
import { Formio } from '../../../Formio';
import * as FormioUtils from '../../../utils/utils';
import {
fastCloneDeep, boolValue, isInsideScopingComponent, currentTimezone, getScriptPlugin
fastCloneDeep, boolValue, isInsideScopingComponent, currentTimezone, getScriptPlugin, getContextualRowData
} from '../../../utils/utils';
import Element from '../../../Element';
import ComponentModal from '../componentModal/ComponentModal';
Expand Down Expand Up @@ -3342,6 +3342,9 @@ export default class Component extends Element {
* @returns {string} - The message to show when the component is invalid.
*/
invalidMessage(data, dirty, ignoreCondition, row) {
if (!row) {
row = getContextualRowData(this.component, data, this.paths);
}
if (!ignoreCondition && !this.checkCondition(row, data)) {
return '';
}
Expand All @@ -3362,6 +3365,8 @@ export default class Component extends Element {
data,
row,
path: this.path || this.component.key,
parent: this.parent?.component,
paths: this.paths,
scope: validationScope,
instance: this,
processors: [
Expand Down Expand Up @@ -3446,6 +3451,7 @@ export default class Component extends Element {
data,
row,
value: this.validationValue,
parent: this.parent?.component,
paths: this.paths,
path: this.path || this.component.key,
instance: this,
Expand Down

0 comments on commit 6ff4457

Please sign in to comment.