lib/mongoid/uuid/validator.rb
# Ensures that every value is of a valid compact UUID format.
Ensures that every value is of a valid compact UUID format.
Ensures that every value is of a valid compact UUID format .
def validate_each(record, attribute, value)
          unless Mongoid::Uuid.validate(value)
            record.errors.add(attribute, :invalid_uuid)
          end
        end
def validate_each ( record , attribute , value ) unless Mongoid :: Uuid . validate ( value ) record . errors . add ( attribute , :invalid_uuid ) end end
Ensures that every value is of a valid compact UUID format.
Ensures that every value is of a valid compact UUID format .
record
attribute
value