def clean(self, *args, **kwargs): super().clean(*args, **kwargs) self.key = '{0}_{1}'.format(self.project.name, self.name) errors = {} if not name_regex.match(self.name): errors['name'] = 'Invalid' for name in self.network_map.keys(): if not name_regex.match(name): errors['network_map'] = 'Invalid network name "{0}"'.format( name) if errors: raise ValidationError(errors)
def clean(self, *args, **kwargs): super().clean(*args, **kwargs) errors = {} if not name_regex.match(self.name): errors['name'] = 'Invalid' if errors: raise ValidationError(errors)
def clean( self, *args, **kwargs ): super().clean( *args, **kwargs ) errors = {} if not name_regex.match( self.name ): # should we also ping contractor? errors[ 'name' ] = 'Invalid' if errors: raise ValidationError( errors )
def clean(self, *args, **kwargs): super().clean(*args, **kwargs) self.key = '{0}_{1}'.format(self.project.name, self.name) errors = {} if not name_regex.match(self.name): errors['name'] = 'Invalid' if errors: raise ValidationError(errors)
def clean(self, *args, **kwargs): super().clean(*args, **kwargs) if not self.local_path: self.local_path = None errors = {} if self.name != '_builtin_' and not name_regex.match(self.name): errors['name'] = 'Invalid' if errors: raise ValidationError(errors)