equal
deleted
inserted
replaced
360 help_text=soc.models.user.User.is_developer.help_text) |
360 help_text=soc.models.user.User.is_developer.help_text) |
361 |
361 |
362 class Meta: |
362 class Meta: |
363 model = None |
363 model = None |
364 |
364 |
365 |
|
366 def clean_link_name(self): |
365 def clean_link_name(self): |
367 link_name = self.cleaned_data.get('link_name') |
366 link_name = self.cleaned_data.get('link_name') |
368 if not validate.LinkNameFormatValid(link_name): |
367 if not validate.isLinkNameFormatValid(link_name): |
369 raise forms.ValidationError("This link name is in wrong format.") |
368 raise forms.ValidationError("This link name is in wrong format.") |
370 else: |
369 else: |
371 if id_user.doesLinkNameExist(link_name): |
370 if id_user.doesLinkNameExist(link_name): |
372 raise forms.ValidationError("This link name is already in use.") |
371 raise forms.ValidationError("This link name is already in use.") |
373 return link_name |
372 return link_name |