Use validators in newforms.
class MyForm(newforms.Form):
secret_phrase = newforms.CharField(label='Secret phrase',
required=True)
def clean_secret_phrase(self):
if self.cleaned_data.get('secret_phrase') == 'xyzzy':
return True
else:
raise newforms.
It is clear that old forms and manipulators will be replaced with new
forms. But what about Django.core.validators. Will that too go off? If
so, what do we use?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
2 matches
Mail list logo