FluentValidation
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
FluentValidation të lejon të shkruash rregullat e validimit si kod të lexueshëm: RuleFor(x => x.Email).NotEmpty().EmailAddress(); — më fleksibël se atributet.
EnglishEN
FluentValidation lets you write validation rules as readable code: RuleFor(x => x.Email).NotEmpty().EmailAddress(); — more flexible than attributes.
Si ta mendosh
Si një listë kontrolli që lexohet si fjali.
Lexoje në anglisht
Like a checklist that reads like sentences.
Shembull kodicsharp
public class NxenesValidator : AbstractValidator<NxenesDto> {
public NxenesValidator() => RuleFor(n => n.Nota).InclusiveBetween(1, 10);
}