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

Added support for validating OCI tags #1372

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MadsRC
Copy link

@MadsRC MadsRC commented Feb 12, 2025

Fixes Or Enhances

Added a new oci_tag to validate an OCI manifest tag as described in the OCI Distribution Spec: https://github.com/opencontainers/distribution-spec/blob/main/spec.md?plain=1#L164-L166

This is also more commonly referred to as a container tag or a docker tag.

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
MadsRC MadsRC
@MadsRC MadsRC requested a review from a team as a code owner February 12, 2025 10:58
@nodivbyzero
Copy link
Contributor

Thank you for your contribution!
Adding a new validation function requires updating the documentation and README.
Otherwise, everything looks good to me.

MadsRC and others added 2 commits March 22, 2025 13:29

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
MadsRC MadsRC
@coveralls
Copy link

Coverage Status

coverage: 74.245% (+0.004%) from 74.241%
when pulling 4a694d2 on MadsRC:master
into 8592022 on go-playground:master.

@MadsRC
Copy link
Author

MadsRC commented Mar 22, 2025

I've updated my branch with latest changes from upstream and added to the README.md and doc.go file.

@MadsRC MadsRC mentioned this pull request Mar 22, 2025
1 task
@@ -211,6 +215,7 @@ validate := validator.New(validator.WithRequiredStructEnabled())
| uuid_rfc4122 | Universally Unique Identifier UUID RFC4122 |
| md4 | MD4 hash |
| md5 | MD5 hash |
| oci_tag | Open Container Initiative (OCI) Tag |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maybe leave this and remove all the other formatting changes?

Otherwise, it doesn't feel clear and should probably be cleaned up in a different PR. There are small things like some lost/changed formatting here and there that I would rather not make part of this PR.

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

Successfully merging this pull request may close these issues.

None yet

4 participants