mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
24 lines
621 B
C#
24 lines
621 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using BTCPayServer.Abstractions.Form;
|
|
|
|
namespace BTCPayServer.Forms;
|
|
|
|
public class HtmlTextareaFormProvider : FormComponentProviderBase
|
|
{
|
|
public override void Register(Dictionary<string, IFormComponentProvider> typeToComponentProvider)
|
|
{
|
|
typeToComponentProvider.Add("textarea", this);
|
|
}
|
|
|
|
public override string View => "Forms/TextareaElement";
|
|
|
|
public override void Validate(Form form, Field field)
|
|
{
|
|
if (field.Required)
|
|
{
|
|
ValidateField<RequiredAttribute>(field);
|
|
}
|
|
}
|
|
}
|