lib/virtualbox/vm.rb in virtualbox-0.7.2 vs lib/virtualbox/vm.rb in virtualbox-0.7.3

- old
+ new

@@ -293,11 +293,9 @@ validates_presence_of :name, :os_type_id, :memory_size, :vram_size, :cpu_count validates_numericality_of :memory_balloon_size, :monitor_count validates_inclusion_of :accelerate_3d_enabled, :accelerate_2d_video_enabled, :teleporter_enabled, :in => [true, false] - validates_format_of :name, :with => /^[\w\d\s-]+$/, :message => 'must only contain letters, numbers, spaces, underscores, and dashes.' - if !errors_on(:name) # Only validate the name if the name has no errors already vms_of_same_name = self.class.find(name) add_error(:name, 'must not be used by another virtual machine.') if vms_of_same_name && vms_of_same_name.uuid != uuid end