Dome404 opened a new issue, #44870:
URL: https://github.com/apache/airflow/issues/44870

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.6.2.
   
   ### What happened?
   
   When triggering DAGs manually in the Airflow UI, while using any validation 
options available, it only allows the default value to be changed by +-1. 
   Normal triggering with no validation options:
   DAG definition:
   ```
   @dag(
      ***
       params={"keks": Param(0.7, type="number")},
      ***
   )
   ```
   Airflow UI
   ![Screenshot 2024-12-12 at 11 12 
06](https://github.com/user-attachments/assets/138cb6ed-c692-46ed-a1c1-85b78d7d48e7)
   Works without problem
   
   Trying to trigger with validation for minimum and maximum:
   DAG definition:
   ```
   @dag(
      ***
       params={"keks": Param(0.7, type="number", minimum=0, maximum=1)},
      ***
   )
   ```
   Airflow UI
   ![Screenshot 2024-12-12 at 11 14 
29](https://github.com/user-attachments/assets/03ac8ca3-cba3-4af9-860c-45f7e7713061)
   ![Screenshot 2024-12-12 at 11 14 
34](https://github.com/user-attachments/assets/1334c757-496e-46e6-86fc-5733a6840843)
   Validation Works as intended
   But if we try to input any number that isn't +-1 of the original number, the 
validation breaks
   
   ![Screenshot 2024-12-12 at 11 17 
42](https://github.com/user-attachments/assets/f4f70a04-ccc0-4e98-a3ee-35d1b7a1f28d)
   
   
   ### What you think should happen instead?
   
   The UI should behave the same as when there are no validators when using 
validators, allowing inputing a float number regardless of it being default + 1 
or default -1.
   
   ### How to reproduce
   
   Make a DAG with a defined parameter which is a number and contains 
validation.
   Something like this:
   ```
   @dag(
      ***
       params={"keks": Param(0.7, type="number", minimum=0, maximum=1)},
      ***
   )
   ```
   Run Airflow and try to trigger this DAG w/confige changing the parameter to 
anything else that should be valid, for example a float number around the 
default value (which is inside the min/max validation)
   
   
   ### Operating System
   
   ProductName:            macOS ProductVersion:         14.6.1 BuildVersion:   
        23G93
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   Every time when validators are used for a number field in params for Airflow 
UI
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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