Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field type=string, format=email validation fails #43

Open
vojtechmares opened this issue May 8, 2024 · 0 comments
Open

Field type=string, format=email validation fails #43

vojtechmares opened this issue May 8, 2024 · 0 comments

Comments

@vojtechmares
Copy link

vojtechmares commented May 8, 2024

Hello,

I am having an issue with validating the email format of string. I am trying to pass regular email like john.doe@example.com or my email, but no matter what, I am getting a validation error:

json: error calling MarshalJSON for type types.Email: email: failed to pass regex validation

My schema

# ...
        email:
          type: string
          format: email
# ...

I am using Fiber as my HTTP server. Golang 1.22.3 on macOS (darwin/arm64).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant