Skip to content

Conversation

x24git
Copy link

@x24git x24git commented Apr 20, 2023

Currently, the Input Dialog accepts a Validator as a parameter but does not actually display anything via the UI. This PR fixes the following:

  • Add option for validate_while_typing to input_dialog and passes along to TextField.
  • Add a new has_any_validation_error filter that returns if any buffer in the application layout has a validation error.
  • Modify ValidationToolbar to accept a specific buffer object rather than just the currently focused buffer.
  • Modify the input_dialog object to validate when OK button is activated and prevent closing while validation errors exist.
@x24git
Copy link
Author

x24git commented Apr 21, 2023

Should Fix Issue #1715

)

# Extract buffer validation errors for buffer UIControl children classes
def get_buffer_from_content(content: UIControl) -> bool:
Copy link
Member

@jonathanslenders jonathanslenders Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename this? This doesn't return the buffer. For instance control_has_validation_error().
This PR looks good otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants