Skip to content

Commit

Permalink
Validation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Oddvocado committed Oct 2, 2023
1 parent e405d88 commit 8fbf195
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/UDS.Net.Forms/Models/UDS3/B9.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public class B9 : FormModel

[Display(Name = "Based on the clinician's assessment, at what age did the behavioral symptoms begin?")]
[RequiredIf(nameof(DECCLBE), "1", ErrorMessage = "Please provide a value")]
[Range(15, 110)]
public int? BEAGE { get; set; }

#endregion
Expand Down
10 changes: 5 additions & 5 deletions src/UDS.Net.Forms/Pages/UDS3/B9.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ public class B9Model : FormPageModel

public Dictionary<string, UIBehavior> MOMOALSUIBehavior = new Dictionary<string, UIBehavior>
{
{"0", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.ALSAGE") } },
{"0", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.ALSAGE"), InstructionalMessage ="Skip to question 19" } },
{"1", new UIBehavior { PropertyAttribute = new UIEnableAttribute("B9.ALSAGE") } },
{"9", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.ALSAGE") } }
{"9", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.ALSAGE"), InstructionalMessage ="Skip to question 19" } }

};
};
public Dictionary<string, UIBehavior> MOMOPARKUIBehavior = new Dictionary<string, UIBehavior>
{
{"0", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.PARKAGE") } },
{"0", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.PARKAGE"), InstructionalMessage = "Skip to question 18"} },
{"1", new UIBehavior { PropertyAttribute = new UIEnableAttribute("B9.PARKAGE") } },
{"9", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.PARKAGE") } }
{"9", new UIBehavior { PropertyAttribute = new UIDisableAttribute("B9.PARKAGE"), InstructionalMessage ="Skip to question 18" } }

};
public Dictionary<string, UIBehavior> BEHVHALLUIBehavior = new Dictionary<string, UIBehavior>
Expand Down

0 comments on commit 8fbf195

Please sign in to comment.