Commit 182c058c authored by Julia Anishka's avatar Julia Anishka

changed verify_int function name

parent 81fadb25
......@@ -13,7 +13,7 @@ class Author(models.Model):
def __str__(self):
return self.first_name + ' ' + self.last_name
def verify_ISBN(value):
def verify_int(value):
if value.isdigit() == False:
raise ValidationError('ISBN must only be integers.')
......@@ -31,7 +31,7 @@ class Books(models.Model):
year_published = models.IntegerField(null = True, blank = True,
validators=[MinValueValidator(1000), MaxValueValidator(datetime.now().year)]
)
ISBN = models.CharField(max_length = 13, validators = [MinValueValidator(13), verify_ISBN])
ISBN = models.CharField(max_length = 13, validators = [MinValueValidator(13), verify_int])
blurb = models.TextField(validators = [verify_wordCount])
def __str__(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment