MCPcopy Create free account
hub / github.com/TanStack/form / getErrorMapKey

Function getErrorMapKey

packages/form-core/src/FieldApi.ts:2049–2065  ·  view source on GitHub ↗
(cause: ValidationCause)

Source from the content-addressed store, hash-verified

2047}
2048
2049function getErrorMapKey(cause: ValidationCause) {
2050 switch (cause) {
2051 case 'submit':
2052 return 'onSubmit'
2053 case 'blur':
2054 return 'onBlur'
2055 case 'mount':
2056 return 'onMount'
2057 case 'server':
2058 return 'onServer'
2059 case 'dynamic':
2060 return 'onDynamic'
2061 case 'change':
2062 default:
2063 return 'onChange'
2064 }
2065}

Callers 3

validateFieldFnMethod · 0.70
FieldApiClass · 0.70
validateFieldAsyncFnMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected