lib/reform/form/validate.rb in reform-2.1.0 vs lib/reform/form/validate.rb in reform-2.2.0.rc1
- old
+ new
@@ -7,10 +7,10 @@
def call(form, options)
params = options[:input]
# TODO: Schema should provide property names as plain list.
properties = options[:binding][:nested].definitions.collect { |dfn| dfn[:name] }
- properties.each { |name| params[name].present? and return false }
+ properties.each { |name| (!params[name].nil? && params[name] != "") and return false }
true # skip
end
end
end