(shouldUpdateValid?: boolean)
| 210 | }; |
| 211 | |
| 212 | const _setValid = async (shouldUpdateValid?: boolean) => { |
| 213 | if (_state.keepIsValid) { |
| 214 | return; |
| 215 | } |
| 216 | if ( |
| 217 | !_options.disabled && |
| 218 | (_proxyFormState.isValid || |
| 219 | _proxySubscribeFormState.isValid || |
| 220 | shouldUpdateValid) |
| 221 | ) { |
| 222 | let isValid: boolean; |
| 223 | if (_options.resolver) { |
| 224 | isValid = isEmptyObject((await _runSchema()).errors); |
| 225 | _updateIsValidating(); |
| 226 | } else { |
| 227 | isValid = await executeBuiltInValidation({ |
| 228 | fields: _fields, |
| 229 | onlyCheckValid: true, |
| 230 | eventType: EVENTS.VALID, |
| 231 | }); |
| 232 | } |
| 233 | if (isValid !== _formState.isValid) { |
| 234 | _subjects.state.next({ |
| 235 | isValid, |
| 236 | }); |
| 237 | } |
| 238 | } |
| 239 | }; |
| 240 | |
| 241 | const _updateIsValidating = (names?: string[], isValidating?: boolean) => { |
| 242 | if ( |
no test coverage detected
searching dependent graphs…