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.
44 lines
1.2 KiB
44 lines
1.2 KiB
// ==========================================================================
|
|
// GeolocationFieldProperties.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
using Newtonsoft.Json.Linq;
|
|
using Squidex.Infrastructure;
|
|
|
|
namespace Squidex.Core.Schemas
|
|
{
|
|
[TypeName("GeolocationField")]
|
|
public sealed class GeolocationFieldProperties : FieldProperties
|
|
{
|
|
private GeolocationFieldEditor editor;
|
|
|
|
public GeolocationFieldEditor Editor
|
|
{
|
|
get { return editor; }
|
|
set
|
|
{
|
|
ThrowIfFrozen();
|
|
|
|
editor = value;
|
|
}
|
|
}
|
|
|
|
public override JToken GetDefaultValue()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
protected override IEnumerable<ValidationError> ValidateCore()
|
|
{
|
|
if (!Editor.IsEnumValue())
|
|
{
|
|
yield return new ValidationError("Editor is not a valid value", nameof(Editor));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|