updated ValidatorExtension to avoid using a deprecated method