@@ -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()
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user