 PyWebIO v1.3.3 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.3 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.1 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.1 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.0 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.0 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.2 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.2 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.6.1 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3 PyWebIO v1.6.1 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3
 PyWebIO v1.6.2 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3 PyWebIO v1.6.2 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3
 PyWebIO v1.6.3 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3 PyWebIO v1.6.3 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3
 PyWebIO v1.6.0 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3 PyWebIO v1.6.0 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3
 PyWebIO v1.5.2 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3 PyWebIO v1.5.2 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 108 页 | 1.37 MB | 1 年前3
 PyWebIO v1.4.0 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 102 页 | 1.35 MB | 1 年前3 PyWebIO v1.4.0 Documentationvalidation function should 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 'Too young!!' if p > 60: return 'Too old!!' age = input("How old are you?", type=NUMBER, validate=check_age) When the user input an illegal value, the input field is displayed as follows: 10 Chapter 4 input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age) ]) put_text(data['name'], data['age']) The input group also supports using validate parameter0 码力 | 102 页 | 1.35 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9














