system-praktyk-api/src/InternshipSystem.Core/ValueObject/BranchAddress.cs
maxchil 8514e593fa doroboty (#53)
XDDDEEEE

gtfo

Merge branch 'master' of http://git.kadet.net/system-praktyk/system-praktyk-api into doroboty

finaly

Co-authored-by: MaxchilKH <m.w.bohdanowicz@gmail.com>
2020-10-02 19:56:53 +02:00

31 lines
873 B
C#

using FluentValidation;
using FluentValidation.Validators;
namespace InternshipSystem.Core
{
public class BranchAddress
{
public string Street { get; set; }
public string Building { get; set; }
public string City { get; set; }
public string PostalCode { get; set; }
public string Country { get; set; }
public class Validator : AbstractValidator<BranchAddress>
{
public Validator()
{
RuleFor(x => x.Country)
.NotEmpty();
RuleFor(x => x.City)
.NotEmpty();
RuleFor(x => x.PostalCode)
.NotEmpty();
RuleFor(x => x.Street)
.NotEmpty();
RuleFor(x => x.Building)
.NotEmpty();
}
}
}
}