diff options
author | HombreLaser <sebastian-440@live.com> | 2022-09-20 20:34:32 -0500 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2022-09-20 20:34:32 -0500 |
commit | f20b0eec603e8951cf78ed119745a85fde521706 (patch) | |
tree | bef5e124a08be616713c07141d568767d938bc5d /Models | |
parent | f4f9762085b9858eacd7906188841e06e20a893a (diff) |
Añadido un validador para el autor
Diffstat (limited to 'Models')
-rw-r--r-- | Models/Author.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Models/Author.cs b/Models/Author.cs index 23e8a64..fc5d103 100644 --- a/Models/Author.cs +++ b/Models/Author.cs @@ -10,6 +10,7 @@ namespace LibraryAPI.Models { [StringLength(64, ErrorMessage = "Name too long")] public string? Name { get; set; } [Required] + [Range(0, 2020, ErrorMessage = "Year out of valid range")] public int YearOfBirth { get; set; } [Required] public string[]? languages { get; set; } |