MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / _runSchema

Function _runSchema

src/logic/createFormControl.ts:464–476  ·  view source on GitHub ↗
(name?: InternalFieldName[])

Source from the content-addressed store, hash-verified

462 };
463
464 const _runSchema = async (name?: InternalFieldName[]) => {
465 _updateIsValidating(name, true);
466 return await _options.resolver!(
467 _formValues as TFieldValues,
468 _options.context,
469 getResolverOptions(
470 name || _names.mount,
471 _fields,
472 _options.criteriaMode,
473 _options.shouldUseNativeValidation,
474 ),
475 );
476 };
477
478 const executeSchemaAndUpdateState = async (names?: InternalFieldName[]) => {
479 const { errors } = await _runSchema(names);

Callers 4

_setValidFunction · 0.85
onChangeFunction · 0.85
handleSubmitFunction · 0.85

Calls 1

_updateIsValidatingFunction · 0.85

Tested by

no test coverage detected