lib/active_record_survey/node.rb
def validate_instance_node(instance_node)
			# Basically this cache is messed up? Why? TODO.
			# Reloading in the spec seems to fix this... but... this could be a booby trap for others
			#self.node_validations(true)

			# Check the validations on this node against the instance_node
			validations_passed = !self.node_validations.collect { |node_validation|
				node_validation.validate_instance_node(instance_node, self)
			}.include?(false)

			# More complex....
			# Recureses to the parent node to check
			# This is to validate Node::Question since they don't have instance_nodes directly to validate them
			parent_validations_passed = !self.survey.node_maps.select { |i| i.node == self}.collect { |node_map|
				if node_map.parent
					node_map.parent.node.validate_parent_instance_node(instance_node, self)
				# Hit top node
				else
					true
				end
			}.include?(false)

			validations_passed && parent_validations_passed
		end
def validate_instance_node(instance_node)
			# Basically this cache is messed up? Why? TODO.
			# Reloading in the spec seems to fix this... but... this could be a booby trap for others
			#self.node_validations(true)

			# Check the validations on this node against the instance_node
			validations_passed = !self.node_validations.collect { |node_validation|
				node_validation.validate_instance_node(instance_node, self)
			}.include?(false)

			# More complex....
			# Recureses to the parent node to check
			# This is to validate Node::Question since they don't have instance_nodes directly to validate them
			parent_validations_passed = !self.survey.node_maps.select { |i| i.node == self}.collect { |node_map|
				if node_map.parent
					node_map.parent.node.validate_parent_instance_node(instance_node, self)
				# Hit top node
				else
					true
				end
			}.include?(false)

			validations_passed && parent_validations_passed
		end
Run all validations applied to this node