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



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

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

#valid?Boolean

Returns:

  • (Boolean)


264
265
266
267
268
# File 'lib/reform/form.rb', line 264

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