DnsResourceRecordInfo: Added validation for Comments.

This commit is contained in:
Shreyas Zare
2022-03-26 11:36:42 +05:30
parent 09f3f90ae7
commit 8b5a4af2f9

View File

@@ -220,7 +220,13 @@ namespace DnsServerCore.Dns.ResourceRecords
public string Comments
{
get { return _comments; }
set { _comments = value; }
set
{
if (value.Length > 255)
throw new ArgumentOutOfRangeException(nameof(Comments), "Resource record comment text cannot exceed 255 characters.");
_comments = value;
}
}
public DateTime DeletedOn