Skip to content

Commit

Permalink
Fix field names in validation in Add
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed Dec 12, 2019
1 parent 0139824 commit a51d68b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WoL/Models/ViewModels/AddHostViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ public class AddHostViewModel : IValidatableObject
public int Id { get; set; }

[StringLength(255)]
[Display(Name = "Hostname")]
public string Hostname { get; set; }

[StringLength(255)]
[Required]
[Display(Name = "Title")]
public string Caption { get; set; }

[StringLength(17, MinimumLength = 17)]
[Display(Name = "Mac address")]
public string MacAddress { get; set; }

public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Expand Down

0 comments on commit a51d68b

Please sign in to comment.