mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Implements account login
This commit is contained in:
1 parent
abc2777357
commit
38829d64ff
23 files changed
+826
-7
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using FluentValidation;
|
||||
using Lumina.Presentation.Web.Common.Models.Configuration;
|
||||
using System;
|
||||
using System.Buffers.Text;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for the EncryptionSettings application configuration settings section.
|
||||
/// </summary>
|
||||
public class EncryptionSettingsModelValidator : AbstractValidator<EncryptionSettingsModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EncryptionSettingsModelValidator"/> class.
|
||||
/// </summary>
|
||||
public EncryptionSettingsModelValidator()
|
||||
{
|
||||
RuleFor(x => x.SecretKey)
|
||||
.NotEmpty().WithMessage("Encryption secret key cannot be empty!")
|
||||
.Must(value => Base64.IsValid(value.AsSpan())).WithMessage("Encryption secret key must be a base64 string!");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user