Sha256: 653734ab9ba5bcf48e8217ff85522ce7d813cb845f20696b18b764d6af8c3eec
Contents?: true
Size: 504 Bytes
Versions: 41
Compression:
Stored size: 504 Bytes
Contents
# frozen_string_literal: true class MiniDefender::Rules::Confirmed < MiniDefender::Rule def initialize @found = false end def self.signature 'confirmed' end def passes?(attribute, value, validator) key = "#{attribute}_confirmation" (@found = validator.data.key?(key)) && value == validator.data[key] end def message(attribute, value, validator) if @found 'The value confirmation does not match.' else 'The value must be confirmed.' end end end
Version data entries
41 entries across 41 versions & 1 rubygems