class Burner::Modeling::Validations::Blank
Check if a value is blank, if it is not blank then it is not valid.
Constants
- BLANK_RE
Public Instance Methods
valid?(object, resolver)
click to toggle source
# File lib/burner/modeling/validations/blank.rb, line 21 def valid?(object, resolver) value = resolver.get(object, key).to_s value.empty? || BLANK_RE.match?(value) end
Private Instance Methods
default_message()
click to toggle source
# File lib/burner/modeling/validations/blank.rb, line 29 def default_message 'must be blank' end