Class: Reform::Form::Validate::Skip::AllBlank
- Inherits:
-
Object
- Object
- Reform::Form::Validate::Skip::AllBlank
- Includes:
- Uber::Callable
- Defined in:
- lib/reform/form/validate.rb
Instance Method Summary collapse
Instance Method Details
#call(form, options) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/reform/form/validate.rb', line 7 def call(form, ) params = [:input] # TODO: Schema should provide property names as plain list. properties = [:binding][:nested].definitions.collect { |dfn| dfn[:name] } properties.each { |name| (!params[name].nil? && params[name] != "") and return false } true # skip end |