react-hook-form 7.41.1 → 7.41.3

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.
@@ -676,6 +676,7 @@ var validateField = async (field, inputValue, validateAllFieldCriteria, shouldUs
676
676
  isUndefined(ref.value) &&
677
677
  isUndefined(inputValue)) ||
678
678
  inputValue === '' ||
679
+ ref.value === '' ||
679
680
  (Array.isArray(inputValue) && !inputValue.length);
680
681
  const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);
681
682
  const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {
@@ -1695,8 +1696,7 @@ function createFormControl(props = {}, flushRootRender) {
1695
1696
  }
1696
1697
  (options.shouldDirty || options.shouldTouch) &&
1697
1698
  updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);
1698
- options.shouldValidate &&
1699
- trigger(name);
1699
+ options.shouldValidate && trigger(name);
1700
1700
  };
1701
1701
  const setValues = (name, value, options) => {
1702
1702
  for (const fieldKey in value) {