Skip to content

Commit

Permalink
Allow dashes in saltenv names (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBadBassMan authored Apr 12, 2024
1 parent 3053de4 commit 5b0c8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/foreman_salt/salt_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SaltEnvironment < ApplicationRecord
has_many :salt_module_environments
has_many :salt_modules, through: :salt_module_environments, before_remove: :remove_from_hosts

validates :name, uniqueness: true, presence: true, format: { with: /\A[\w\d.]+\z/, message: N_('is alphanumeric and cannot contain spaces') }
validates :name, uniqueness: true, presence: true, format: { with: /\A[\w\d\-.]+\z/, message: N_('is alphanumeric and cannot contain spaces') }

scoped_search on: :name, complete_value: true
scoped_search relation: :hostgroups, on: :name, complete_value: true, rename: :hostgroup
Expand Down

0 comments on commit 5b0c8b5

Please sign in to comment.