PyWebIO v1.2.3 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an parameter to set the validation function, which accepts the entire form data as parameter: 4.1. User’s guide 11 PyWebIO, Release 1.2.3 def check_form(data): # input group validation: return (input name name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] <= 0: return ('age', 'Age can not be negative!') Attention: PyWebIO determines whether0 码力 | 92 页 | 1.32 MB | 1 年前3
PyWebIO v1.2.2 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an parameter to set the validation function, which accepts the entire form data as parameter: 4.1. User’s guide 11 PyWebIO, Release 1.2.2 def check_form(data): # input group validation: return (input name name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] <= 0: return ('age', 'Age can not be negative!') Attention: PyWebIO determines whether0 码力 | 92 页 | 1.35 MB | 1 年前3
PyWebIO v1.3.3 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an parameter to set the validation function, which accepts the entire form data as parameter: 4.1. User’s guide 11 PyWebIO, Release 1.3.3 def check_form(data): # input group validation: return (input name name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] <= 0: return ('age', 'Age can not be negative!') Attention: PyWebIO determines whether0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.3.1 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an parameter to set the validation function, which accepts the entire form data as parameter: 4.1. User’s guide 11 PyWebIO, Release 1.3.1 def check_form(data): # input group validation: return (input name name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] <= 0: return ('age', 'Age can not be negative!') Attention: PyWebIO determines whether0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.3.0 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an parameter to set the validation function, which accepts the entire form data as parameter: 4.1. User’s guide 11 PyWebIO, Release 1.3.0 def check_form(data): # input group validation: return (input name name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] <= 0: return ('age', 'Age can not be negative!') Attention: PyWebIO determines whether0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.2.3 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an the input data as the value: The input group also supports using validate parameter to set the validation function, which accepts the entire form data as parameter: Attention PyWebIO determines whether put_text(data['name'], data['age']) def check_form(data): # input group validation: return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long0 码力 | 119 页 | 7.43 MB | 1 年前3
PyWebIO v1.2.2 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an the input data as the value: The input group also supports using validate parameter to set the validation function, which accepts the entire form data as parameter: Attention PyWebIO determines whether put_text(data['name'], data['age']) def check_form(data): # input group validation: return (input name, error msg) when validation fail if len(data['name']) > 6: return ('name', 'Name too long0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v1.3.2 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an parameter to set the validation function, which accepts the entire form data as parameter: 4.1. User’s guide 11 PyWebIO, Release 1.3.2 def check_form(data): # input group validation: return (input name name, error msg) when ˓→validation fail if len(data['name']) > 6: return ('name', 'Name too long!') if data['age'] <= 0: return ('age', 'Age can not be negative!') Attention: PyWebIO determines whether0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.6.1 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an validate parameter to set the validation 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: ML/Element/input#Browser_compatibility • validate (callable) – Input value validation function. If provided, the validation function will be called when user completes the input field or submits the form0 码力 | 108 页 | 1.37 MB | 1 年前3
PyWebIO v1.5.2 Documentationresults of the above example are as follows: You can specify a validation function for the input by using validate parameter. The validation function should return None when the check passes, otherwise an validate parameter to set the validation 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: ML/Element/input#Browser_compatibility • validate (callable) – Input value validation function. If provided, the validation function will be called when user completes the input field or submits the form0 码力 | 108 页 | 1.37 MB | 1 年前3
共 80 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8













