Class: OpenvasCli::VasLscCredentialValidator

Inherits:
ActiveModel::Validator
  • Object
show all
Defined in:
lib/openvas-cli/vas_lsc_credential.rb

Instance Method Summary collapse

Instance Method Details

#validate(record) ⇒ Object



5
6
7
8
9
# File 'lib/openvas-cli/vas_lsc_credential.rb', line 5

def validate(record)
  if record.password && record.password != record.password_confirmation
    record.errors[:password] << "and Password Confirmation do not match."
  end
end