Even though PostForm has a validator setting max length to 1500 (which is what a StringProperty will allow), if i try to submit the PostForm, it will fail to validate with error:
{'summary': [u'Field cannot be longer than 500 characters.', u'Field cannot be longer than 500 characters.']}
It appears that adding a validator using ndb.model_form does not replace the default validators, but rather either extends them or ignores them.
This could be fixed by changing the StringProperty based validator to allow for 1500 chars instead of just 500
I have a wtf_appengine form defined with:
which pulls from the NDB
POST
class:Even though
PostForm
has a validator setting max length to 1500 (which is what aStringProperty
will allow), if i try to submit the PostForm, it will fail to validate with error:{'summary': [u'Field cannot be longer than 500 characters.', u'Field cannot be longer than 500 characters.']}
It appears that adding a validator using
ndb.model_form
does not replace the default validators, but rather either extends them or ignores them.This could be fixed by changing the
StringProperty
based validator to allow for 1500 chars instead of just 500