Gets more validation bits wired up. Server side validation is now working which is based on val-server-field since we can use this natively with the asp.net ModelState result instead of the val-server which is actually to be used with PropertyType (Property Editors). Next up is validation for the different tabs of the editor.

This commit is contained in:
Shannon
2015-10-08 17:13:38 +02:00
parent 97c352030a
commit c477f7a840
18 changed files with 149 additions and 36 deletions

View File

@@ -26,9 +26,11 @@ namespace Umbraco.Web.Models.ContentEditing
public override string Alias { get; set; }
[DataMember(Name = "updateDate")]
[ReadOnly(true)]
public DateTime UpdateDate { get; set; }
[DataMember(Name = "createDate")]
[ReadOnly(true)]
public DateTime CreateDate { get; set; }
[DataMember(Name = "description")]

View File

@@ -11,7 +11,7 @@ using Umbraco.Core.Models.Validation;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "contentType", Namespace = "")]
public class ContentTypeCompositionDisplay : ContentTypeBasic
public class ContentTypeCompositionDisplay : ContentTypeBasic, INotificationModel
{
public ContentTypeCompositionDisplay()
{

View File

@@ -26,15 +26,17 @@ namespace Umbraco.Web.Models.ContentEditing
public PropertyTypeValidation Validation { get; set; }
[DataMember(Name = "label")]
[Required]
public string Label { get; set; }
[DataMember(Name = "sortOrder")]
public int SortOrder { get; set; }
[DataMember(Name = "dataTypeId")]
[Required]
public int DataTypeId { get; set; }
//SD: Is this really required ?
//SD: Is this really needed ?
[DataMember(Name = "groupId")]
public int GroupId { get; set; }
}