Skip to content
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

Merged
merged 8 commits into from
Jan 14, 2020
Merged

Emoji validate #253

merged 8 commits into from
Jan 14, 2020

Conversation

qurbat
Copy link
Contributor

@qurbat qurbat commented Jan 13, 2020

No description provided.

@qurbat qurbat mentioned this pull request Jan 14, 2020
test_requirements.txt Outdated Show resolved Hide resolved
baseframe/forms/validators.py Outdated Show resolved Hide resolved
baseframe/forms/validators.py Outdated Show resolved Hide resolved
@qurbat qurbat marked this pull request as ready for review January 14, 2020 09:04
@qurbat qurbat merged commit c3468e2 into master Jan 14, 2020
Copy link
Member

@jace jace left a 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):

Copy link
Member

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
Copy link
Member

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):
Copy link
Member

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.

@jace
Copy link
Member

jace commented Jan 14, 2020

This is also missing tests, so it reduces overall test coverage.

qurbat added a commit that referenced this pull request Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants