class Wpxf::Models::Credential

A set of credentials for a specific target.

Public Instance Methods

validate() click to toggle source
Calls superclass method
# 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