Skip to content

Commit

Permalink
Apply data validators
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNDRmac committed Jul 12, 2023
1 parent 1381984 commit 898d32e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SignNow.Net.Model;
using SignNow.Net.Model.ComplexTags;

namespace UnitTests.Models.ComplexTags
Expand Down Expand Up @@ -208,7 +209,7 @@ public void ShouldSerializeDateValidatorTag()
Height = 15,
Width = 100,
LockSigningDate = true,
Validator = "13435fa6c2a17f83177fcbb5c4a9376ce85befeb"
Validator = DataValidator.DateUS
};

var expected = @"{
Expand Down
3 changes: 2 additions & 1 deletion SignNow.Net/Model/ComplexTags/DateValidatorTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class DateValidatorTag : ComplexTagWithLabel
/// Data validation format for a field
/// </summary>
[JsonProperty("validator_id", Order = 2)]
public string Validator { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public DataValidator Validator { get; set; }
}
}

0 comments on commit 898d32e

Please sign in to comment.