Update to latest packages and show examples
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using FluentValidation;
|
||||
using GerstITS.Validation;
|
||||
|
||||
namespace GerstITS.Examples.Logic.Customers.Validation;
|
||||
|
||||
internal sealed class CustomerValidationRule : ValidationRuleBase<Customer>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public CustomerValidationRule()
|
||||
{
|
||||
RuleFor(x => x.FirstName)
|
||||
.NotEmpty();
|
||||
|
||||
RuleFor(x => x.LastName)
|
||||
.NotEmpty();
|
||||
|
||||
RuleFor(x => x.EMail)
|
||||
.NotEmpty()
|
||||
.IsEMail();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user