react-hook-form 7.32.0 → 7.32.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.
@@ -1025,7 +1025,7 @@ var getCheckboxValue = (options) => {
1025
1025
  var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)
1026
1026
  ? value
1027
1027
  : valueAsNumber
1028
- ? value === ''
1028
+ ? value === '' || isNullOrUndefined(value)
1029
1029
  ? NaN
1030
1030
  : +value
1031
1031
  : valueAsDate && isString(value)
@@ -1225,7 +1225,7 @@ var validateField = async (field, inputValue, validateAllFieldCriteria, shouldUs
1225
1225
  let exceedMin;
1226
1226
  const maxOutput = getValueAndMessage(max);
1227
1227
  const minOutput = getValueAndMessage(min);
1228
- if (!isNaN(inputValue)) {
1228
+ if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {
1229
1229
  const valueNumber = ref.valueAsNumber || +inputValue;
1230
1230
  if (!isNullOrUndefined(maxOutput.value)) {
1231
1231
  exceedMax = valueNumber > maxOutput.value;
@@ -1498,6 +1498,7 @@ function createFormControl(props = {}) {
1498
1498
  }
1499
1499
  else {
1500
1500
  clearTimeout(timer);
1501
+ delayErrorCallback = null;
1501
1502
  error
1502
1503
  ? set(_formState.errors, name, error)
1503
1504
  : unset(_formState.errors, name);