Sha256: 8b39cd9ae055f3de5b905285e2da65b04a8ab111ae13bc1eae0378afb790a0fe
Contents?: true
Size: 311 Bytes
Versions: 7
Compression:
Stored size: 311 Bytes
Contents
# coding: utf-8 module RussianPhone class PresenceValidator < ActiveModel::Validator def validate(record) options[:fields].each do |field| if record.send(field).phone.blank? record.errors[field] << 'Необходимо заполнить' end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems