@react-typed-forms/schemas 11.5.4 → 11.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1241,13 +1241,9 @@ function useValidationHook(definition, field) {
1241
1241
  }
1242
1242
  function useJsonataValidator(control, context, expr, hidden, i) {
1243
1243
  var errorMsg = useJsonataExpression(expr.expression, context);
1244
- core.useControlEffect(function () {
1245
- return [hidden, errorMsg.value];
1246
- }, function (_ref2) {
1247
- var hidden = _ref2[0],
1248
- msg = _ref2[1];
1249
- return control.setError("jsonata" + i, !hidden ? msg : null);
1250
- }, true);
1244
+ core.useValidator(control, function () {
1245
+ return !hidden ? errorMsg.value : null;
1246
+ }, "jsonata" + i);
1251
1247
  }
1252
1248
  function useDateValidator(control, dv, i) {
1253
1249
  var comparisonDate;