I already mentioned that this probably needs to be cleaned up, this class extends RequiredNameValidator for a reason and that is to delegate to it, first by calling super.validate as the very first line in this validate method and then your logic can follow and it means you wouldn't need this check since it is done by the superclass, your logic should only check for duplicates if there are no errors found yet at this point