mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
Allow only letters and underscores in Setting code
This commit is contained in:
parent
c977872c44
commit
abea8abe84
4 changed files with 101 additions and 2 deletions
|
@ -4,6 +4,7 @@ class SettingEntry < ApplicationRecord
|
|||
validates :format, presence: true
|
||||
validates :group, presence: true
|
||||
validate :valid_value_format
|
||||
validates_format_of :code, with: /([a-z])[a-z|_]+[a-z]/
|
||||
|
||||
VALUE_FORMATS = {
|
||||
string: :string_format,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue