[Fixed]-Django textfield can't pass validation

1👍

str(cd) is "('www', 'com', '.net')". You probably want to to exclude values that contain any of the strings in cd:

if any(x in value for x in cd):
    raise ValidationError(u'dont play smart')

Leave a comment