db input validation and unit testing - B1