class Tsubaki::MyNumberValidator
Private Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/tsubaki/my_number_validator.rb, line 6 def validate_each(record, attribute, value) return if Tsubaki::MyNumber.new(value, options).valid? record.errors.add(attribute, options[:message] || :invalid) end