adds functions to validate required inputs