First Check
Example Code
from nicegui import ui
input_element = ui.input(value="valid", validation=lambda value: None if value else "required")
input_element.props(remove="error error-message")
input_element.validate()
Description
I am using a validated ui.input and clearing Quasar validation props through NiceGUI's public props() API.
I expect either:
- the public API to reject removal of reserved validation props, or
validate() to recover gracefully.
What currently happens is that validate() raises:
This seems to happen because ValidationElement.error later reads self._props['error'], but that key can still be removed through props(remove="error ...").
NiceGUI Version
3.9.0
Python Version
3.12.3
Browser
Chrome
Operating System
Linux
Additional Context
This looks related to #3809, which also hit a ValidationElement KeyError around the reserved error prop. The trigger here seems different: in this case the key can be removed through the public props(remove="error ...") API and the later validate() call then crashes.
First Check
Example Code
Description
I am using a validated
ui.inputand clearing Quasar validation props through NiceGUI's publicprops()API.I expect either:
validate()to recover gracefully.What currently happens is that
validate()raises:This seems to happen because
ValidationElement.errorlater readsself._props['error'], but that key can still be removed throughprops(remove="error ...").NiceGUI Version
3.9.0
Python Version
3.12.3
Browser
Chrome
Operating System
Linux
Additional Context
This looks related to #3809, which also hit a
ValidationElement KeyErroraround the reservederrorprop. The trigger here seems different: in this case the key can be removed through the publicprops(remove="error ...")API and the latervalidate()call then crashes.