-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove middleware and generic rulebuilder with rulefor and rulef…
…oreach in respective validators
- Loading branch information
Jan Lesage
committed
Jan 11, 2024
1 parent
a94e864
commit 2be788a
Showing
42 changed files
with
182 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/AssociationRegistry.Admin.Api/Infrastructure/HtmlValidation/NoHtmlAttribute.cs
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/AssociationRegistry.Admin.Api/Infrastructure/Middleware/NoHtmlMiddleware.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
src/AssociationRegistry.Admin.Api/Verenigingen/Common/AdresValidator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
namespace AssociationRegistry.Admin.Api.Verenigingen.Common; | ||
|
||
using FluentValidation; | ||
using Infrastructure.Extensions; | ||
using Infrastructure.Validation; | ||
|
||
public class AdresValidator : AbstractValidator<Adres> | ||
{ | ||
public AdresValidator() | ||
{ | ||
this.RequireNotNullOrEmpty(adres => adres.Straatnaam); | ||
this.RequireNotNullOrEmpty(locatie => locatie.Huisnummer); | ||
this.RequireNotNullOrEmpty(locatie => locatie.Gemeente); | ||
this.RequireNotNullOrEmpty(locatie => locatie.Land); | ||
this.RequireNotNullOrEmpty(locatie => locatie.Postcode); | ||
this.RequireNotNullOrEmpty(adres => adres.Huisnummer); | ||
this.RequireNotNullOrEmpty(adres => adres.Gemeente); | ||
this.RequireNotNullOrEmpty(adres => adres.Land); | ||
this.RequireNotNullOrEmpty(adres => adres.Postcode); | ||
|
||
RuleFor(adres => adres.Straatnaam).MustNotContainHtml(); | ||
RuleFor(adres => adres.Huisnummer).MustNotContainHtml(); | ||
RuleFor(adres => adres.Busnummer).MustNotContainHtml(); | ||
RuleFor(adres => adres.Postcode).MustNotContainHtml(); | ||
RuleFor(adres => adres.Gemeente).MustNotContainHtml(); | ||
RuleFor(adres => adres.Land).MustNotContainHtml(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.