-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji validate #253
Emoji validate #253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes required.
@@ -319,6 +320,15 @@ def __call__(self, form, field): | |||
return | |||
else: | |||
raise ValidationError(self.message) | |||
|
|||
class IsEmoji(object): | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring required.
class IsEmoji(object): | ||
|
||
def __init__(self, message=None): | ||
self.message = message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fallback to a default message as in the other validators.
@@ -319,6 +320,15 @@ def __call__(self, form, field): | |||
return | |||
else: | |||
raise ValidationError(self.message) | |||
|
|||
class IsEmoji(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validator was inserted between two validators that are related to each other. This one should have been before or after them. Move it.
This is also missing tests, so it reduces overall test coverage. |
No description provided.