Skip to content

Commit

Permalink
Validate format of Cluster#name
Browse files Browse the repository at this point in the history
  • Loading branch information
dbackeus committed Jun 17, 2024
1 parent c2b1017 commit 2f66b3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Cluster < ApplicationRecord
validates_presence_of :name
validates_presence_of :endpoint
validates_presence_of :secrets
validates_format_of :name, with: /\A[a-z0-9-]+\z/, message: "may only contain lowercase letters, numbers and dashes"
validate :validate_secrets_yaml
validate :validate_endpoint_url

Expand Down

0 comments on commit 2f66b3f

Please sign in to comment.