x-ui-design 0.5.12 → 0.5.14

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 CHANGED
@@ -730,12 +730,6 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
730
730
  const rules = rulesRef.current[name] || [];
731
731
  const fieldErrors = [];
732
732
  const fieldWarnings = [];
733
- console.log({
734
- name,
735
- value,
736
- stepRef: JSON.parse(JSON.stringify(stepRef.current)),
737
- formRef: JSON.parse(JSON.stringify(formRef.current))
738
- });
739
733
  await Promise.all([rules].flat(1).map(async rule => {
740
734
  rule = typeof rule === 'function' ? rule(formInstance) : rule;
741
735
  if (rule.required && (rule.validateBooleanFalse && !value || value === undefined || value === null || value === '' || Array.isArray(value) && !value.length)) {
@@ -747,6 +741,7 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
747
741
  if ((typeof value === 'string' || typeof value === 'number' || Array.isArray(value)) && rule.max !== undefined && String(value).length > rule.max) {
748
742
  fieldErrors.push(rule.message || `Must be at most ${rule.max} characters`);
749
743
  }
744
+ debugger;
750
745
  if (value !== undefined && rule.pattern && !rule.pattern.test(String(value))) {
751
746
  fieldErrors.push(rule.message || 'Invalid format');
752
747
  }