Adding in server side validation - but need to clarify that this is the 'right' way to do it that wires up correctly/magically back to the UI components

This commit is contained in:
Warren Buckley
2017-01-04 14:12:45 +00:00
parent 42841824bf
commit 1300764770
2 changed files with 18 additions and 0 deletions

View File

@@ -1,21 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Core.Models.Validation;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "template", Namespace = "")]
public class TemplateDisplay
{
[DataMember(Name = "id")]
public int Id { get; set; }
[Required]
[DataMember(Name = "name")]
public string Name { get; set; }
[RequiredForPersistence]
[DataMember(Name = "alias")]
public string Alias { get; set; }