Sha256: b273509ef926ae92b189f5a0ac18b7200d1f4e68be14b7632e6ce9df506f4dd1
Contents?: true
Size: 226 Bytes
Versions: 10
Compression:
Stored size: 226 Bytes
Contents
# frozen_string_literal: true class AsciiOnlyValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if value && !value.ascii_only? record.errors.add(attribute, :ascii) end end end
Version data entries
10 entries across 10 versions & 1 rubygems