Not really. GOV.UK Design System team have done lots of research into this and their guidance says:
> Generally speaking, avoid validating the information in a field before the user has finished entering it. This sort of validation can cause problems - especially for users who type more slowly