Skip to content

Commit 71485be

Browse files
committed
Null values for not-required strings are treated as empty strings
Fixes #187
1 parent e485ef1 commit 71485be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

django_jsonform/validators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ def validate_string(self, schema, data, coords, raise_exc=False):
299299
trimmed_data = data.strip()
300300
else:
301301
trimmed_data = data
302+
data = data or ""
302303

303304
is_empty = not trimmed_data
304305

0 commit comments

Comments
 (0)