Today in any form, we can have real-time validation like in example below
The question is: When should I trigger the validation: as soon as possible ? (seems good for the name error, but bad for the email field: it will mark invalid but the user hasn't stop typing yet)
On focus out ? (seems good but you need to move back to the field to correct it, instead of knowing immediately)
On focus out the first time, as soon as possible the second time?
Is there a mix between the two that is better? Does it depend on the type of validation error?
P.S: We also have a final validation just before the Submit button, so that users are redirected (through links) to the invalid fields. I know of this answer: Form validation - When should error messages be triggered? but I would like other insights