I have a regex to validate if the string is a base64 string. I also check if the mimimum legnth of the base 64 string is 4 but what is the maximum length of characters a base64 string can contain??
I created a regex and added a mimimun atribute and added validation.
public class EndpointAddRequest : RequestBase
{
[MinLength(4, ErrorMessage = "The number of characters is less than the minimum amount")]
[RegularExpression(RegexConstants.Base64String, ErrorMessage = "Invalid AccessDevice Uid")]
[Required(ErrorMessage = "AccessDevice uid is required")]
}