potiuk commented on code in PR #32867:
URL: https://github.com/apache/airflow/pull/32867#discussion_r1307178612


##########
airflow/www/validators.py:
##########
@@ -99,6 +100,18 @@ def __call__(self, form, field):
                 raise ValidationError(str(e))
 
 
+class ValidConnID:
+    """Validates `conn_id`.
+
+    Validates the provided `conn_id` to ensure it adheres to the correct 
format. If not, raises a validation
+    exception.
+    """
+
+    def __call__(self, form, field):
+        if field.data and sanitize_conn_id(field.data) is None:
+            raise ValidationError("There was an error validating 'conn_id', 
ensure it is valid.")

Review Comment:
   ```suggestion
               raise ValidationError("There was an error validating 'conn_id', 
ensure it is valid.\n"
                      "Only allows alphanumeric characters plus the symbols 
@,#,$,%,&,!,-,_,.,:,\,/ and ()
       from 1 and up to 200 consecutive matches.")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to