Is there any way, to change the field's *min_length* argument inside form constructor? That doesn't work:
def __init__(self, *args, **kwargs):
super(CreateTeamForm, self).__init__(*args, **kwargs)
self.fields['primary_color'].min_length = 4
Is there any way, to change the field's *min_length* argument inside form constructor? That doesn't work:
def __init__(self, *args, **kwargs):
super(CreateTeamForm, self).__init__(*args, **kwargs)
self.fields['primary_color'].min_length = 4
Copyright © 2021 Jogjafile Inc.
Try setting the field's
validators
attribute in the__init__
method.