Module CouchRest::Validation::ClassMethods
In: lib/couchrest/mixins/validation.rb

Methods

Included Modules

CouchRest::Validation::ValidatesPresent CouchRest::Validation::ValidatesAbsent CouchRest::Validation::ValidatesIsConfirmed CouchRest::Validation::ValidatesFormat CouchRest::Validation::ValidatesLength CouchRest::Validation::ValidatesIsNumber CouchRest::Validation::ValidatesWithMethod CouchRest::Validation::AutoValidate

Public Instance methods

Create a new validator of the given klazz and push it onto the requested context for each of the attributes in the fields list

Given a new context create an instance method of valid_for_<context>? which simply calls valid?(context) if it does not already exist

Clean up the argument list and return a opts hash, including the merging of any default opts. Set the context to default if none is provided. Also allow :context to be aliased to :on, :when & group

Return the set of contextual validators or create a new one

[Validate]