Added extremely basic validation for required fields.