Question · NestJS course · Module 10: Data Validation

Asynchronous Custom Validators

When are asynchronous custom validators (async: true) used?

Answer options

  • Always - asynchronous validators are faster
  • Only when the application runs in production mode
  • When validation requires access to a database or external API
  • When the field is of type Promise

You can check the correct answer by solving this task in the CodeWorlds game.