Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2774

Mongoid-specific validations only exist on the model class, not the instance

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.1.2
    • Affects Version/s: None
    • Component/s: None

      ActiveModel allows me to declare, say,

      @person.validates_format_of :email, with: /../

      Mongoids special validations validates_uniqueness_of and validates_associated only exist as class methods, not instance methods.

            Assignee:
            durran Durran Jordan
            Reporter:
            schnittchen schnittchen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: