Question · Angular course · Module 8: Forms
Return value on error
What should a custom validator return when the value is INVALID?
Answer options
- null
- false
- A ValidationErrors object, e.g. { forbiddenName: true }
- throw new Error()
You can check the correct answer by solving this task in the CodeWorlds game.