Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Update Field Client Validation #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Plugins/RawCMS.Plugins.Core/Model/FieldClientValidation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
// <author>Daniele Fontani, Emanuele Bucarelli, Francesco Mina'</author>
// <autogenerated>true</autogenerated>
//******************************************************************************
using System.ComponentModel.DataAnnotations;

namespace RawCMS.Plugins.Core.Model
{
public class FieldClientValidation
{
[Required]
public string Name { get; set; }
public string Function { get; set; }
}
Expand Down
1 change: 1 addition & 0 deletions RawCMS.Library/Schema/CollectionSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace RawCMS.Library.Schema
public class CollectionSchema
{
public string CollectionName { get; set; }

public bool AllowNonMappedFields { get; set; }

public List<Field> FieldSettings { get; set; } = new List<Field>();
Expand Down
7 changes: 4 additions & 3 deletions RawCMS.Library/Service/EntityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down