diff --git a/src/process/validation/rules/validateCustom.ts b/src/process/validation/rules/validateCustom.ts index c1f618ff..f671d5d3 100644 --- a/src/process/validation/rules/validateCustom.ts +++ b/src/process/validation/rules/validateCustom.ts @@ -49,7 +49,11 @@ export const validateCustomSync: RuleFnSync = (context: ValidationContext) => { return null; } - return new FieldError(typeof isValid === 'string' ? isValid : 'custom', {...context, hasLabel: false }); + return new FieldError(typeof isValid === 'string' ? isValid : 'custom', { + ...context, + hasLabel: false, + setting: customValidation, + }); }; diff --git a/src/process/validation/rules/validateJson.ts b/src/process/validation/rules/validateJson.ts index 5caf2c0c..936d46ff 100644 --- a/src/process/validation/rules/validateJson.ts +++ b/src/process/validation/rules/validateJson.ts @@ -38,7 +38,10 @@ export const validateJsonSync: RuleFnSync = (context: ValidationContext) => { } return valid === true ? null - : new FieldError(valid || 'jsonLogic', context); + : new FieldError(valid || 'jsonLogic', { + ...context, + setting: func, + }); }; export const validateJsonInfo: ProcessorInfo = {