Add isValid() to input widgets? #924
Replies: 4 comments 1 reply
-
Yes, an
Would you like to open a pull request for it? You can start with a small proof-of-concept and we improve on it iteratively until it's ready to be merged. |
Beta Was this translation helpful? Give feedback.
-
Hi @falkoschindler . I am flattered by your trust, but I could only achieve that in C++. I am still in the process of learning Python and I am barely able to use NiceGui, but not able to extend it at the moment. I can provide suggestions based on my experience with C++ based GUI frameworks, though. |
Beta Was this translation helpful? Give feedback.
-
I just reviewed #894, which is closely related to this feature request. |
Beta Was this translation helpful? Give feedback.
-
This feature is implemented via PR #894 and PR #924 and will be released in 1.2.22. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I' m new to NiceGui and the underlying technology. So maybe I just do not know how to do this. When creating a ui.number widget with min = 0 and max = 100, the validation can be set accordingly:
However, I can still enter 101 directly. I catch that case in parameterChange(), but I have no access to paramOne.min or paramOne.max nor can I find a way to check if the input is valid. The above code does work, however, I have to duplicate magic numbers. A function like paramOne.isValid() would be the best solution in my eyes.
Cheers
Uwe
Beta Was this translation helpful? Give feedback.
All reactions