> For the complete documentation index, see [llms.txt](https://angular-fast-forms.codentury.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angular-fast-forms.codentury.com/custom-validation/async.md).

# Async Validator

## Creation

A custom async validator can be created with a validator factory seen in the following example.

```typescript
@Validator({
  id: 'custom-async-required',
  type: 'async'
})
@Injectable()
export class AsyncRequiredValidator implements BaseAsyncValidator {

  createValidator(args: string[]): AsyncValidatorFn {
    return control => {
      return of({
        required: true
      })
    };
  }
}
```
