Adds validation method