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

Validating Array field

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

      field :categories, type: Array
      validates :categories, inclusion:

      { in: ["a", "b", "c"] }

      Array fields are not validated. Workaround?
      What about this: http://zogovic.com/post/32932492190/how-to-validate-array-fields-in-mongoid?

            Assignee:
            Unassigned Unassigned
            Reporter:
            xpepermint Kristijan Sedlak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: