code: def validate(path):  # pragma: no cover
      
      # reads the 'dynaconf_validators.toml' from path
      # for each section register the validator for specific env
      # call validate
  
      path = Path(path)
  
      if not str(path).endswith(".toml"):
          path = path / "dynaconf_validators.toml"
  
      if not path.exists():  # pragma: no cover  # noqa
          click.echo(
              click.style("{} not found".format(path), fg="white", bg="red")
          )
          sys.exit(1)
  
      validation_data = toml.load(open(str(path)))
  
      success = True
      for env, name_data in validation_data.items():
          for name, data in name_data.items():
              if not isinstance(data, dict):  # pragma: no cover
                  click.echo(
                      click.style(
                          "Invalid rule for parameter '{}'".format(name),
                          fg="white",
                          bg="yellow",
                      )
                  )
              else:
                  data.setdefault("env", env)
                  click.echo(
                      click.style(
                          "Validating '{}' with '{}'".format(name, data),
                          fg="white",
                          bg="blue",
                      )
                  )
                  try:
                      Validator(name, **data).validate(settings)
                  except ValidationError as e:
                      click.echo(
                          click.style(
                              "Error: {}".format(e), fg="white", bg="red"
                          )
                      )
                      success = False
  
      if success:
          click.echo(click.style("Validation success!", fg="white", bg="green"))
docs: Validates Dynaconf settings based on rules defined in
      dynaconf_validators.toml