Add method "validate" in class "User"