Add ssh key validation
This commit is contained in:
parent
8da05a4ff7
commit
5afb16e496
2 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ class Key < ActiveRecord::Base
|
|||
|
||||
validates :key,
|
||||
presence: true,
|
||||
:format => { :with => /ssh-.{3} / },
|
||||
length: { within: 0..5000 }
|
||||
|
||||
before_save :set_identifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue