def nodes_minimum_distance_validation(self):
if self.layer and self.layer.nodes_minimum_distance:<EOL><INDENT>minimum_distance = self.layer.nodes_minimum_distance<EOL>near_nodes = Node.objects.exclude(pk=self.id).filter(geometry__distance_lte=(self.geometry, D(m=minimum_distance))).count()<EOL>if near_nodes > <NUM_LIT:0>:<EOL><INDENT>raise ValidationError(_('<STR_LIT>') % minimum_distance)<EOL><DEDENT><DEDENT>
if minimum distance is specified, ensure node is not too close to other nodes;