[Validator] Fix constraints to not use deprecated methods