Skip to content

Commit

Permalink
Allow saving an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
madeviv committed Jun 10, 2021
1 parent 67281c8 commit a5c5ad7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using ApplyToBecome.Data;
using ApplyToBecome.Data.Models;
Expand All @@ -11,6 +12,7 @@ public class RationaleForProjectModel : BaseProjectPageModel
public RationaleForProjectModel(IProjects projects) : base(projects) { }

[BindProperty(Name = "project-rationale")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public string RationaleForProject { get; set; }

public bool ShowError { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using ApplyToBecome.Data;
using ApplyToBecome.Data.Models;
Expand All @@ -11,6 +12,7 @@ public class RationaleForTrustModel : BaseProjectPageModel
public RationaleForTrustModel(IProjects projects) : base(projects) { }

[BindProperty(Name = "trust-rationale")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public string RationaleForTrust { get; set; }

public bool ShowError { get; set; }
Expand Down

0 comments on commit a5c5ad7

Please sign in to comment.