python - WTForm always return False -


i'm using wtforms json validation:

forms.py

class vcodeform(form): type = textfield('type', [validators.length(min=4, max=25)]) 

views.py

@app.route('/vcode', methods = ['get'])   def vcode():     form = vcodeform(request.args)     return str(form.validate()) 

args(using httpie tool)

http --session=s1 localhost:5000/vcode type==register 

the value returned flase, print value of form.type.data

<input id="type" name="type" type="text" value="register"> 

where did wrong?

i found solution using json validation

it's great , easy understand.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -