Class: Reform::Form::Forms

Inherits:
Array
  • Object
show all
Includes:
ValidateMethods, Representable::Hash::Collection
Defined in:
lib/reform/form.rb

Overview

DISCUSS: this should be a Form subclass.

Instance Method Summary collapse

Methods included from ValidateMethods

#validate

Instance Method Details

#errorsObject



275
276
277
# File 'lib/reform/form.rb', line 275

def errors
  @errors ||= Form::Errors.new(self)
end

#valid?Boolean

Returns:

  • (Boolean)


269
270
271
272
273
# File 'lib/reform/form.rb', line 269

def valid?
  inject(true) do |res, form|
    res = validate_for(form, res)
  end
end