Validating input via callback function?

Hi guys,

I’m wondering if it is possible to check text input values via a callback function.e.g.:
ip = st.text_input(‘IP for system one’, value=‘192.168. …’, max_chars=18, on_change=my_callback)

my_callback should check if the input is a valid ipaddress. However I don’t know how streamlit hands
the input over to the callback function and how to reference it in the function

Is it possible to do that during input or do I have to use a form_submit_button on_click callback and provide the inputs as arguments to the on_click function?



That would be great If someone could answer this quesiton.
I searched everywhere but couldn’t find the solution.

Sorry - above was the wrong link to the author of the post.
Here comes the right link: Callbacks - how to get current control value? - #2 by ksxx