Fix validator

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-15 13:01:52 +01:00
parent 81cb0de8f2
commit 729551beac
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ const (
func (tcar *TrustCenterAccessRequest) Validate() error {
v := validator.New()
v.Check(tcar.Email, "email", validator.NotBlacklisted())
v.Check(tcar.Email.Domain(), "email", validator.NotBlacklisted())
return v.Error()
}

View File

@@ -35,7 +35,7 @@ func NotBlacklisted() ValidatorFunc {
return func(value any) *ValidationError {
err := notOneOfSlice(value)
if err == nil {
if err != nil {
return newValidationError(
ErrorCodeInvalidEmail,
"must not be blacklisted",