/**
 * [schema defines validation schemas for Mongo documents being inserted into db:ibu collection:ibuerrors]
 *
 *
 */

var ibuErrorSchema = new Schema({
  filename: {
    type: String,
    validate: {
      validator: function(v){
        return /^[^.]+$/.test(v);
      },
      message: 'Filename is not valid!'
    }
  },
  collection: {
    type: String
  },
  IMGerrors: {
    type: Array
  },
  XMLerrors: {
    type: Array
  }
});

var ibuErrorDoc = mongoose.model('ibuErrorDoc', ibuErrorSchema);

@@ -1,8 +1,22 @@
+'use strict';%0A
 /**%0A * %5B
@@ -132,217 +132,371 @@
  */%0A
-%0Avar ibuErrorSchema = new Schema(%7B%0A  filename: %7B%0A    type: String,%0A    validate: %7B%0A      validator: function(v)%7B%0A        return /%5E%5B%5E.%5D+$/.test(v);%0A      %7D,%0A      message: 'Filename is not valid!'%0A    %7D
+ // Mongoose connection to MongoDB%0Aconst mongoose = require('mongoose');%0Avar Schema = mongoose.Schema;%0A%0Avar ibuErrorSchema = new Schema(%7B%0A  filename: %7B%0A    type: String,%0A    trim: true%0A  %7D,%0A  filePathXML: %7B%0A    type: String,%0A    unique: true%0A  %7D,%0A  filePathIMG: %7B%0A    type: String,%0A    unique: true%0A  %7D,%0A  extentionName: %7B%0A    type: String,%0A    trim: true
 %0A  %7D,%0A  
 coll
@@ -491,17 +491,20 @@
 %0A  %7D,%0A  
-c
+libC
 ollectio
@@ -604,10 +604,144 @@
 %0A  %7D
-%0A%7D
+,%0A  created: %7B%0A    type: Date , default: Date.now%0A  %7D%0A%7D);%0A//,%0A// validate: %7B%0A//   validator: function(v)%7B%0A//     return /%5E%5B%5E.%5D+$/.test(v
 );%0A%0A
@@ -805,8 +805,38 @@
 chema);%0A
+module.exports = ibuErrorDoc;%0A

Add Fields & removed Validate