class PeselValidator
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/polish_validators_rails.rb, line 20 def validate_each(record, attribute, value) validator = ::PolishValidators::PeselValidator.new(value) record.errors.add(attribute, @options[:message] || 'Invalid PESEL format') unless validator.valid? end