@react-typed-forms/schemas 14.5.0 → 14.5.1
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.cjs +2 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/validators.ts +3 -3
package/lib/index.js
CHANGED
|
@@ -1869,7 +1869,7 @@ function useMakeValidationHook(definition, useValidatorFor = useDefaultValidator
|
|
|
1869
1869
|
})));
|
|
1870
1870
|
}, [!!dd, dd == null ? void 0 : dd.required, depString, useValidatorFor]);
|
|
1871
1871
|
}
|
|
1872
|
-
|
|
1872
|
+
const useDefaultValidator = (validator, ctx) => {
|
|
1873
1873
|
switch (validator.type) {
|
|
1874
1874
|
case ValidatorType.Length:
|
|
1875
1875
|
useLengthValidator(validator, ctx);
|
|
@@ -1881,7 +1881,7 @@ function useDefaultValidator(validator, ctx) {
|
|
|
1881
1881
|
useDateValidator(validator, ctx);
|
|
1882
1882
|
break;
|
|
1883
1883
|
}
|
|
1884
|
-
}
|
|
1884
|
+
};
|
|
1885
1885
|
function useJsonataValidator(validator, ctx) {
|
|
1886
1886
|
const sdn = ctx.dataContext.parentNode;
|
|
1887
1887
|
const errorMsg = useJsonataExpression(validator.expression, getRootDataNode(sdn).control, getJsonPath(sdn), undefined, v => v == null ? null : typeof v === "string" ? v : JSON.stringify(v));
|