Sha256: f674d93ec9e0dffbbf1538005594101c9dff6cc9826fa55759ccadf567c4b878
Contents?: true
Size: 258 Bytes
Versions: 5
Compression:
Stored size: 258 Bytes
Contents
class YoutubeValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors[attribute] << (options[:message] || "- используются недопустимые символы") if value =~ /[^A-z0-9_-]/ end end
Version data entries
5 entries across 5 versions & 1 rubygems