Exemplo n.º 1
0
 def clean_signature(self):
     signature = self.cleaned_data['signature']
     if is_spam(self.request, signature):
         raise forms.ValidationError(
             "Your signature was considered spam, please edit and resubmit. If it keeps "
             "failing please contact the admins.")
     return signature
Exemplo n.º 2
0
    def clean_comment(self):
        comment = self.cleaned_data['comment']

        if is_spam(self.request, comment):
            raise forms.ValidationError("Your comment was considered spam, please edit and repost. If it keeps failing please contact the admins.")
        
        return comment
Exemplo n.º 3
0
 def clean_about(self):
     about = self.cleaned_data['about']
     if is_spam(self.request, about):
         raise forms.ValidationError(
             "Your 'about' text was considered spam, please edit and resubmit. If it keeps "
             "failing please contact the admins.")
     return about
Exemplo n.º 4
0
    def clean_comment(self):
        comment = self.cleaned_data['comment']

        if is_spam(self.request, comment):
            raise forms.ValidationError(
                "Your comment was considered spam, please edit and repost. If it keeps failing please contact the admins."
            )

        return comment
Exemplo n.º 5
0
    def clean_sound_signature(self):
        sound_signature = self.cleaned_data['sound_signature']
        if is_spam(self.request, sound_signature):
            raise forms.ValidationError("Your sound signature was considered spam, please edit and resubmit. If it "
                                        "keeps failing please contact the admins.")
        if len(sound_signature) > 256:
            raise forms.ValidationError("Your sound signature must not exeed 256 chars, please edit and resubmit.")

        return sound_signature
Exemplo n.º 6
0
    def clean_body(self):
        body = self.cleaned_data['body']

        if self.quote and body.strip() == self.quote:
            raise forms.ValidationError("You should type something...")

        if is_spam(self.request, body):
            raise forms.ValidationError("Your post was considered spam, please edit and repost. If it keeps failing please contact the admins.")

        return body
Exemplo n.º 7
0
 def clean_signature(self):
     signature = self.cleaned_data['signature']
     if is_spam(self.request, signature):
         raise forms.ValidationError("Your signature was considered spam, please edit and resubmit. If it keeps failing please contact the admins.")
     return signature
Exemplo n.º 8
0
 def clean_about(self):
     about = self.cleaned_data['about']
     if is_spam(self.request, about):
         raise forms.ValidationError("Your 'about' text was considered spam, please edit and resubmit. If it keeps failing please contact the admins.")
     return about