validate required fields