PyWebIO v1.3.3 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! guide 11 PyWebIO, Release 1.3.3 def check_form(data): # input group validation: return (input name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode 20 Chapter 4. Documentation PyWebIO0 码力 | 100 页 | 1.34 MB | 1 年前3PyWebIO v1.3.1 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! guide 11 PyWebIO, Release 1.3.1 def check_form(data): # input group validation: return (input name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode 20 Chapter 4. Documentation PyWebIO0 码力 | 100 页 | 1.34 MB | 1 年前3PyWebIO v1.3.0 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! guide 11 PyWebIO, Release 1.3.0 def check_form(data): # input group validation: return (input name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode 20 Chapter 4. Documentation PyWebIO0 码力 | 100 页 | 1.34 MB | 1 年前3PyWebIO v1.3.2 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! guide 11 PyWebIO, Release 1.3.2 def check_form(data): # input group validation: return (input name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode 20 Chapter 4. Documentation PyWebIO0 码力 | 100 页 | 1.34 MB | 1 年前3PyWebIO v1.6.3 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! function, which accepts the entire form data as parameter: def check_form(data): # return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode If you never call start_server()0 码力 | 108 页 | 1.37 MB | 1 年前3PyWebIO v1.6.2 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! function, which accepts the entire form data as parameter: def check_form(data): # return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode If you never call start_server()0 码力 | 108 页 | 1.37 MB | 1 年前3PyWebIO v1.6.1 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! function, which accepts the entire form data as parameter: def check_form(data): # return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode If you never call start_server()0 码力 | 108 页 | 1.37 MB | 1 年前3PyWebIO v1.5.2 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! function, which accepts the entire form data as parameter: def check_form(data): # return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode If you never call start_server()0 码力 | 108 页 | 1.37 MB | 1 年前3PyWebIO v1.5.1 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! function, which accepts the entire form data as parameter: def check_form(data): # return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode If you never call start_server()0 码力 | 108 页 | 1.37 MB | 1 年前3PyWebIO v1.6.0 Documentation
return None when the check passes, otherwise an error message will be returned: def check_age(p): # return None when the check passes, otherwise return the error ˓→message if p < 10: return 'Too young! function, which accepts the entire form data as parameter: def check_form(data): # return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] not allowed: import pywebio from pywebio.input import input port = input('Input port number:') # error pywebio.start_server(my_task_func, port=int(port)) Script mode If you never call start_server()0 码力 | 108 页 | 1.37 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9