mirror of https://github.com/Squidex/squidex.git
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.
37 lines
1.1 KiB
37 lines
1.1 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace Squidex.Infrastructure
|
|
{
|
|
public sealed class ValidationError
|
|
{
|
|
private static readonly string[] FallbackProperties = 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 ?? FallbackProperties;
|
|
}
|
|
}
|
|
}
|
|
|