Where do I add custom field validation code for a modelform_factory shown
to user with a generic class based view in Django?
Suppose for "floorfield" below I want to add field validation to the
following effect: If user submitted floorfield value is less than 0,
re-prompt the user to submit a new floorfield value greater than zero.
I've read through the django documents, looked for tutorials, and I'm
putting a dent in the wall with my nogging trying to figure out how to
implement the above behavior.
Thank you so much!
class Amodel(...):
floorfield = integerfield()
class Amodel(CreateView):
model = Amodel
form_class = modelform_factory(Amodel, fields=("floorfield",))
No comments:
Post a Comment