Add error reason to form validation for unicode->string list formfield
This commit is contained in:
parent
8937154b1d
commit
bd65e1b239
|
@ -17,7 +17,7 @@ class CustomUnicodeListField(forms.CharField):
|
||||||
first_parse = eval(value)
|
first_parse = eval(value)
|
||||||
string_list = [current_item for current_item in first_parse]
|
string_list = [current_item for current_item in first_parse]
|
||||||
except:
|
except:
|
||||||
raise ValidationError
|
raise ValidationError("Error in converting Unicode list to list of Strings: %r" % value)
|
||||||
|
|
||||||
return string_list
|
return string_list
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue