mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-11 10:32:09 +08:00
Update ManufacturingYear.cs
This commit is contained in:
parent
b70a6568dd
commit
6b4596ef7c
@ -1,4 +1,4 @@
|
||||
namespace Flight.Aircrafts.Models.ValueObjects;
|
||||
namespace Flight.Aircrafts.ValueObjects;
|
||||
|
||||
using Flight.Aircrafts.Exceptions;
|
||||
|
||||
@ -7,7 +7,7 @@ public record ManufacturingYear
|
||||
public int Value { get; }
|
||||
public ManufacturingYear(int value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value.ToString()))
|
||||
if (value < 1900)
|
||||
{
|
||||
throw new InvalidManufacturingYearException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user