def METHOD_NAME(qtbot):
    widget = InputTextDialog()
    qtbot.addWidget(widget)
    widget.show()
    # Test empty
    widget.validate()
    assert not widget.button_ok.isEnabled()
    # Test text
    widget.set_text('hello')
    widget.validate()
    assert widget.button_ok.isEnabled()
    # Test regex ok enabled
    widget.set_text('')
    widget.set_regex_validation('hello')
    qtbot.keyClicks(widget.lineedit, 'hello world!')
    assert widget.text() == 'hello'
    assert widget.button_ok.isEnabled()
    widget.validate()
    # Test regex ok disabled
    widget.set_text('')
    widget.set_regex_validation('hello')
    qtbot.keyClicks(widget.lineedit, 'hell')
    assert not widget.button_ok.isEnabled()
    widget.validate()