mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-05-05 04:22:51 +08:00

* refactor: ♻️ 业务代码项目文件名与框架代码项目文件名区分 * refactor: ♻️ 业务代码项目文件名与框架代码项目文件名区分 --------- Co-authored-by: tk <fiyne1a@dingtalk.com>
18 lines
592 B
C#
18 lines
592 B
C#
namespace NetAdmin.Domain.Attributes.DataValidation;
|
|
|
|
/// <summary>
|
|
/// 邀请码验证器
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
|
public sealed class InviteCodeAttribute : RegexAttribute
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="InviteCodeAttribute" /> class.
|
|
/// </summary>
|
|
public InviteCodeAttribute() //
|
|
: base(Chars.RGX_INVITE_CODE)
|
|
{
|
|
ErrorMessageResourceName = nameof(Ln.邀请码不正确);
|
|
ErrorMessageResourceType = typeof(Ln);
|
|
}
|
|
} |