class BooleanValidator
Protected Instance Methods
is_valid?(value)
click to toggle source
# File lib/validators/boolean_validator.rb, line 8 def is_valid?(value) return true if !options[:strict] && value.present? return true if [true, false].include?(value) return true if allows_nil? && value.nil? return false end
validation_message()
click to toggle source
# File lib/validators/boolean_validator.rb, line 4 def validation_message 'is not a valid value.' end