class_docstr: Validates the connection ID adheres to the desired format.
  
  :param max_length:
      The maximum allowed length of the given Connection ID.
class_docstr_tok: ["Validates","the","connection","ID","adheres","to","the","desired","format",".",":","param","max_length",":","The","maximum","allowed","length","of","the","given","Connection","ID","."]
code: def __call__(self, form, field):
      if field.data:
          if sanitize_conn_id(field.data, self.max_length) is None:
              raise ValidationError(
                  f"{self.message} for 1 and up to {self.max_length} matches"
              )
  
file_path: airflow/airflow/www/validators.py
imports: from __future__ import annotations
  import json
  from json import JSONDecodeError
  from wtforms.validators import EqualTo, ValidationError
  from airflow.models.connection import CONN_ID_MAX_LEN, sanitize_conn_id
  from airflow.utils import helpers
label_desc: Use image node_id 2 for calling the ValidConnID obj's underlying member method code with example usage: obj.__call__(form, field) without return types