from flask_wtf import Form
from wtforms import StringField, validators

from .validation import not_spam


class ShortenedUrlForm(Form):
    url = StringField(
        'Url to be shortened',
        [
            validators.DataRequired(),
            validators.URL(message="A valid url is required"),
            not_spam
        ]
    )

from flask_wtf import Form
from wtforms import StringField, validators

from .validation import not_blacklisted_nor_spam


class ShortenedUrlForm(Form):
    url = StringField(
        'Url to be shortened',
        [
            validators.DataRequired(),
            validators.URL(message="A valid url is required"),
            not_blacklisted_nor_spam
        ]
    )

Replace not_spam validator with not_blacklisted_nor_spam in form class
Replace not_spam validator with not_blacklisted_nor_spam in form class

  from flask_wtf import Form
  from wtforms import StringField, validators
  
- from .validation import not_spam
+ from .validation import not_blacklisted_nor_spam
  
  
  class ShortenedUrlForm(Form):
      url = StringField(
          'Url to be shortened',
          [
              validators.DataRequired(),
              validators.URL(message="A valid url is required"),
-             not_spam
+             not_blacklisted_nor_spam
          ]
      )
  
Replace not_spam validator with not_blacklisted_nor_spam in form class
## Code Before:
from flask_wtf import Form
from wtforms import StringField, validators

from .validation import not_spam


class ShortenedUrlForm(Form):
    url = StringField(
        'Url to be shortened',
        [
            validators.DataRequired(),
            validators.URL(message="A valid url is required"),
            not_spam
        ]
    )

## Instruction:
Replace not_spam validator with not_blacklisted_nor_spam in form class
## Code After:
from flask_wtf import Form
from wtforms import StringField, validators

from .validation import not_blacklisted_nor_spam


class ShortenedUrlForm(Form):
    url = StringField(
        'Url to be shortened',
        [
            validators.DataRequired(),
            validators.URL(message="A valid url is required"),
            not_blacklisted_nor_spam
        ]
    )
