diff --git a/snipts/api.py b/snipts/api.py index 1168ae0..0e47d71 100644 --- a/snipts/api.py +++ b/snipts/api.py @@ -150,6 +150,9 @@ class SniptValidation(Validation): def is_valid(self, bundle, request=None): errors = {} + if (len(bundle.data['title']) > 255): + errors['title-length'] = ("Title must be 255 characters or less.") + if request.user.profile.has_pro is False: if ('public' not in bundle.data or bundle.data['public'] is False): errors['not-pro'] = ("You'll need to go Pro " diff --git a/snipts/templates/snipts/snipt-edit-js-template.html b/snipts/templates/snipts/snipt-edit-js-template.html index c263900..4649413 100644 --- a/snipts/templates/snipts/snipt-edit-js-template.html +++ b/snipts/templates/snipts/snipt-edit-js-template.html @@ -25,7 +25,7 @@

 

- +