validateAsync, there are scenarios where partial, synchronous results can be valuable in your applications. These scenarios can defer the asynchronous validation until the right time in the user's workflow, achieving two-stage sync/async validation.
isValidproperty. Async validators work similarly: to opt into async validation, validators can return any of the following:
Promisethat resolves to a validation result
functionthat returns a validation result (including a
Promisethat resolves to a validation result)
validateAsync. Those additional properties will be available to the application synchronously, before resolving the asynchronous result.
usernameIsAvailablevalidator to make it return both a synchronous result and an asynchronous result.
isValid: trueif synchronous validation should be treated as valid.