Checking for required fields and valid field values.