app/soc/views/models/docs.py
changeset 462 1f164cd0529b
parent 448 075360be6743
child 476 3b0662786f95
--- a/app/soc/views/models/docs.py	Mon Nov 10 00:42:41 2008 +0000
+++ b/app/soc/views/models/docs.py	Mon Nov 10 14:40:16 2008 +0000
@@ -19,6 +19,7 @@
 
 __authors__ = [
     '"Sverre Rabbelier" <sverre@rabbelier.nl>',
+    '"Lennard de Rijk" <ljvderijk@gmail.com>',
     '"Pawel Solyga" <pawel.solyga@gmail.com>',
   ]
 
@@ -56,11 +57,15 @@
   def clean_partial_path(self):
     partial_path = self.cleaned_data.get('partial_path')
     # TODO(tlarsen): combine path and link_name and check for uniqueness
+    if not validate.isPartialPathFormatValid(partial_path):
+      raise forms.ValidationError("This partial path is in wrong format.")
     return partial_path
 
   def clean_link_name(self):
     link_name = self.cleaned_data.get('link_name')
     # TODO(tlarsen): combine path and link_name and check for uniqueness
+    if not validate.isLinkNameFormatValid(link_name):
+      raise forms.ValidationError("This link name is in wrong format.")
     return link_name