Files
server/src/Core/Utilities/EncryptedStringLengthAttribute.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
465 B
C#
Raw Normal View History

2018-08-02 08:57:32 -04:00
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Utilities;
2022-08-29 14:53:16 -04:00
2018-08-02 08:57:32 -04:00
public class EncryptedStringLengthAttribute : StringLengthAttribute
{
public EncryptedStringLengthAttribute(int maximumLength)
: base(maximumLength)
{ }
public override string FormatErrorMessage(string name)
{
return string.Format("The field {0} exceeds the maximum encrypted value length of {1} characters.",
name, MaximumLength);
}
}