Sha256: 35e777ed437be9cc8fe2863365f6e57582e91e62ef9a711ec754997b12456003
Contents?: true
Size: 348 Bytes
Versions: 41
Compression:
Stored size: 348 Bytes
Contents
# frozen_string_literal: true require 'json' class MiniDefender::Rules::Json < MiniDefender::Rule def self.signature 'json' end def passes?(attribute, value, validator) JSON.parse(value) rescue JSON::ParserError false end def message(attribute, value, validator) "The value should be a valid JSON string." end end
Version data entries
41 entries across 41 versions & 1 rubygems