Sha256: 0cdd26f6be2085fcf67c692626ebf5121d7670cf4e7f8666abb5836bc7ce6ba1
Contents?: true
Size: 400 Bytes
Versions: 24
Compression:
Stored size: 400 Bytes
Contents
require 'haveapi/client/validator' module HaveAPI::Client class Validators::Confirmation < Validator name :confirm def valid? other = opts[:parameter].to_sym if opts[:equal] return false if params[other].nil? value == params[other].value else other = params[other] ? params[other].value : nil value != other end end end end
Version data entries
24 entries across 24 versions & 1 rubygems