Skip to content

Commit

Permalink
Update validators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
qurbat committed Jan 20, 2020
1 parent 7a3331b commit 36b949b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions baseframe/forms/validators.py
Expand Up @@ -313,8 +313,9 @@ def __init__(self, message=None):
self.message = message or _(u'This is not a valid emoji.')

def __call__(self, form, field):
if not field.data in emoji.UNICODE_EMOJI:
raise ValidationError(self.message)
if field.data != "":
if not field.data in emoji.UNICODE_EMOJI:
raise ValidationError(self.message)


class IsPublicEmailDomain(object):
Expand Down

0 comments on commit 36b949b

Please sign in to comment.