diff --git a/Plugins/RawCMS.Plugins.Core/Model/FieldClientValidation.cs b/Plugins/RawCMS.Plugins.Core/Model/FieldClientValidation.cs
index c5df909c..0d464ad9 100644
--- a/Plugins/RawCMS.Plugins.Core/Model/FieldClientValidation.cs
+++ b/Plugins/RawCMS.Plugins.Core/Model/FieldClientValidation.cs
@@ -6,10 +6,13 @@
// Daniele Fontani, Emanuele Bucarelli, Francesco Mina'
// true
//******************************************************************************
+using System.ComponentModel.DataAnnotations;
+
namespace RawCMS.Plugins.Core.Model
{
public class FieldClientValidation
{
+ [Required]
public string Name { get; set; }
public string Function { get; set; }
}
diff --git a/RawCMS.Library/Schema/CollectionSchema.cs b/RawCMS.Library/Schema/CollectionSchema.cs
index d5e1b64f..4e065fb5 100644
--- a/RawCMS.Library/Schema/CollectionSchema.cs
+++ b/RawCMS.Library/Schema/CollectionSchema.cs
@@ -23,6 +23,7 @@ namespace RawCMS.Library.Schema
public class CollectionSchema
{
public string CollectionName { get; set; }
+
public bool AllowNonMappedFields { get; set; }
public List FieldSettings { get; set; } = new List();
diff --git a/RawCMS.Library/Service/EntityService.cs b/RawCMS.Library/Service/EntityService.cs
index 001ffee3..c78ba6cb 100644
--- a/RawCMS.Library/Service/EntityService.cs
+++ b/RawCMS.Library/Service/EntityService.cs
@@ -75,10 +75,11 @@ private CollectionSchema AddIdSchemaField(CollectionSchema schema)
{
Field field = new Field
{
- Name = "_id",
//BaseType = FieldBaseType.String,
- Type = "ObjectId",
- Required = true
+ Name = "_id",
+ Required = true,
+ Type = "ObjectId"
+
};
schema.FieldSettings.Add(field);
}