<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_config(self):
 """Validate that the browser config contains all the needed config """


        # LOCALHOST
        if self.location == 'localhost':
            if 'browserName' not in self.config.keys():
                msg = "Add the 'browserName' in your local_config: e.g.: 'Firefox', 'Chrome', 'Safari'"  # noqa
                self.runner.critical_log(msg)
                raise BromeBrowserConfigException(msg)

        # EC2
        elif self.location == 'ec2':
            self.validate_ec2_browser_config()

        # VIRTUALBOX
        elif self.location == 'virtualbox':
            self.validate_virtualbox_config()