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.
22 lines
744 B
22 lines
744 B
// ==========================================================================
|
|
// ValidationTestExtensions.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace Squidex.Core.Schemas
|
|
{
|
|
public static class ValidationTestExtensions
|
|
{
|
|
public static Task ValidateAsync(this Field field, JToken value, bool isOptional, IList<string> errors)
|
|
{
|
|
return field.ValidateAsync(value, isOptional, errors.Add);
|
|
}
|
|
}
|
|
}
|
|
|