validate form with required fields