code: def validate(self):
          
          if not self.file.exists():
              raise ValueError("File \"%s\" doesn't exists")
  
          if not self.search:
              raise ValueError("Search cannot be empty")
  
          if not self.replace:
              raise ValueError("Replace cannot be empty")
  
          if self.match not in ('file', 'line'):
              raise ValueError("Match must be one of: file, line")
  
          try:
              codecs.lookup(self.encoding)
          except LookupError:
              raise ValueError("Unknown encoding: \"%s\"" % self.encoding)
docs: Validate current file configuration
  
          :raise ValueError: