Module: SchemaTools::Modules::Validations

Extended by:
ActiveSupport::Concern
Includes:
ActiveModel::Conversion, ActiveModel::Validations
Defined in:
lib/schema_tools/modules/validations.rb

Overview

Add schema properties to a class by including this module and defining from which schema to inherit attributes.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

Runs all the validations within the specified context.

Returns:

  • (Boolean)

    true if no errors are found, false otherwise



21
22
23
24
# File 'lib/schema_tools/modules/validations.rb', line 21

def valid?
  output = super
  errors.empty? && output
end