x-ui-design 0.5.12 → 0.5.13
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/dist/index.esm.js +1 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/lib/hooks/useForm.ts +2 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -732,12 +732,6 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
|
|
|
732
732
|
const rules = rulesRef.current[name] || [];
|
|
733
733
|
const fieldErrors = [];
|
|
734
734
|
const fieldWarnings = [];
|
|
735
|
-
console.log({
|
|
736
|
-
name,
|
|
737
|
-
value,
|
|
738
|
-
stepRef: JSON.parse(JSON.stringify(stepRef.current)),
|
|
739
|
-
formRef: JSON.parse(JSON.stringify(formRef.current))
|
|
740
|
-
});
|
|
741
735
|
await Promise.all([rules].flat(1).map(async rule => {
|
|
742
736
|
rule = typeof rule === 'function' ? rule(formInstance) : rule;
|
|
743
737
|
if (rule.required && (rule.validateBooleanFalse && !value || value === undefined || value === null || value === '' || Array.isArray(value) && !value.length)) {
|
|
@@ -763,6 +757,7 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
|
|
|
763
757
|
}
|
|
764
758
|
}
|
|
765
759
|
}));
|
|
760
|
+
console.log(fieldErrors);
|
|
766
761
|
setErrors(prev => ({
|
|
767
762
|
...prev,
|
|
768
763
|
[name]: fieldErrors
|