Added recaptcha. Added recaptcha to register page
This commit is contained in:
18
Moonlight/App/Helpers/MustBeTrueAttribute.cs
Normal file
18
Moonlight/App/Helpers/MustBeTrueAttribute.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Logging.Net;
|
||||
|
||||
namespace Moonlight.App.Helpers;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class MustBeTrueAttribute : ValidationAttribute
|
||||
{
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
if (value is bool boolValue)
|
||||
{
|
||||
return boolValue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user