Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Typo : excuteBuildInValidation -> excuteBuiltInValidation #8737

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/logic/createFormControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function createFormControl<
if (_proxyFormState.isValid) {
isValid = _options.resolver
? isEmptyObject((await _executeSchema()).errors)
: await executeBuildInValidation(_fields, true);
: await executeBuiltInValidation(_fields, true);

if (!shouldSkipRender && isValid !== _formState.isValid) {
_formState.isValid = isValid;
Expand Down Expand Up @@ -408,7 +408,7 @@ export function createFormControl<
return errors;
};

const executeBuildInValidation = async (
const executeBuiltInValidation = async (
fields: FieldRefs,
shouldOnlyCheckValid?: boolean,
context = {
Expand Down Expand Up @@ -452,7 +452,7 @@ export function createFormControl<
}

fieldValue &&
(await executeBuildInValidation(
(await executeBuiltInValidation(
fieldValue,
shouldOnlyCheckValid,
context,
Expand Down Expand Up @@ -776,15 +776,15 @@ export function createFormControl<
await Promise.all(
fieldNames.map(async (fieldName) => {
const field = get(_fields, fieldName);
return await executeBuildInValidation(
return await executeBuiltInValidation(
field && field._f ? { [fieldName]: field } : field,
);
}),
)
).every(Boolean);
!(!validationResult && !_formState.isValid) && _updateValid();
} else {
validationResult = isValid = await executeBuildInValidation(_fields);
validationResult = isValid = await executeBuiltInValidation(_fields);
}

_subjects.state.next({
Expand Down Expand Up @@ -1033,7 +1033,7 @@ export function createFormControl<
_formState.errors = errors as FieldErrors<TFieldValues>;
fieldValues = values;
} else {
await executeBuildInValidation(_fields);
await executeBuiltInValidation(_fields);
}

if (isEmptyObject(_formState.errors)) {
Expand Down