Class: Wpxf::Models::Credential

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/wpxf/models/credential.rb

Overview

A set of credentials for a specific target.

Instance Method Summary collapse

Instance Method Details

#validateObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/wpxf/models/credential.rb', line 11

def validate
  super

  validates_presence :host
  validates_presence :port

  validates_numeric :port
  validates_type String, :username, allow_nil: true
  validates_type String, :password, allow_nil: true
  validates_type String, :type, allow_nil: true

  validates_max_length 250, :username, allow_nil: true
  validates_max_length 250, :password, allow_nil: true
  validates_max_length 250, :host
  validates_max_length 20, :type
end