-
Notifications
You must be signed in to change notification settings - Fork 393
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
BUG描述
使用input_group的例程,添加cancelable=True
def check_form(data):
print("call validate check form")
if len(data['name']) > 6:
return ('name', 'Name to long!')
if data['age'] <= 0:
return ('age', 'Age cannot be negative!')
data = input_group("Basic info", [
input('Input your name', name='name'),
input('Repeat your age', name='age', type=NUMBER)
], validate=check_form, cancelable=True)
if data is None:
put_text("cancelled")
else:
put_text(data['name'], data['age'])故意输入错误的name或者age字段,submit使validate返回错误。再点击cancel,此时validate不会被调用,data获得的是上一次的错误的值
环境信息
- 操作系统及版本: windows11
- 浏览器及版本: edge
- Python版本:
- PyWebIO版本: 1.8.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working