adds validation for database endpoints