Currently in WTForms to access errors you have to loop through field errors like so:
for error in form.username.errors: print error
The actual form object has an errors attribute that contains the field names and their errors in a dictionary. So you could do:
form
for fieldName, errorMessages in form.errors.items(): for err in errorMessages: # do something with your errorMessages for fieldName