1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-23 19:42:51 +01:00
Minecraft-Phantom-Panel/Common/Phantom.Common.Data.Web/Users/PasswordRequirementViolation.cs
2023-12-05 14:27:55 +01:00

28 lines
1.1 KiB
C#

using MemoryPack;
using Phantom.Common.Data.Web.Users.PasswordRequirementViolations;
namespace Phantom.Common.Data.Web.Users {
[MemoryPackable]
[MemoryPackUnion(0, typeof(TooShort))]
[MemoryPackUnion(1, typeof(MustContainLowercaseLetter))]
[MemoryPackUnion(2, typeof(MustContainUppercaseLetter))]
[MemoryPackUnion(3, typeof(MustContainDigit))]
public abstract partial record PasswordRequirementViolation {
internal PasswordRequirementViolation() {}
}
}
namespace Phantom.Common.Data.Web.Users.PasswordRequirementViolations {
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record TooShort([property: MemoryPackOrder(0)] int MinimumLength) : PasswordRequirementViolation;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record MustContainLowercaseLetter : PasswordRequirementViolation;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record MustContainUppercaseLetter : PasswordRequirementViolation;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record MustContainDigit : PasswordRequirementViolation;
}