Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
1.1 KiB

// ==========================================================================
// ValidationError.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using System.Collections.Generic;
namespace Squidex.Infrastructure
{
public sealed class ValidationError
{
private static readonly string[] FalbackProperties = new string[0];
private readonly string message;
private readonly string[] propertyNames;
public string Message
{
get { return message; }
}
public IEnumerable<string> PropertyNames
{
get { return propertyNames; }
}
public ValidationError(string message, params string[] propertyNames)
{
Guard.NotNullOrEmpty(message, nameof(message));
this.message = message;
this.propertyNames = propertyNames ?? FalbackProperties;
}
}
}