Module CouchRest::Model::Validations
In: lib/couchrest/model/validations/uniqueness.rb
lib/couchrest/model/validations/casted_model.rb
lib/couchrest/model/validations.rb

Validations may be applied to both Model::Base and Model::CastedModel

Methods

valid?  

Included Modules

ActiveModel::Validations

Classes and Modules

Module CouchRest::Model::Validations::ClassMethods
Class CouchRest::Model::Validations::CastedModelValidator
Class CouchRest::Model::Validations::UniquenessValidator

Public Instance methods

Determine if the document is valid.

@example Is the document valid?

  person.valid?

@example Is the document valid in a context?

  person.valid?(:create)

@param [ Symbol ] context The optional validation context.

@return [ true, false ] True if valid, false if not.

[Validate]