Skip to content

Commit

Permalink
feat: allow more docker references to be placed
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Jan 1, 2025
1 parent 2a46285 commit 7266622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion App/Utility/ValidationUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static IRuleBuilderOptions<T, string> DockerReferenceValid<T>(
this IRuleBuilder<T, string> ruleBuilder)
{
return ruleBuilder
.Matches(@"^((\w(-?\w+)*)(\.\w(-?\w+)*)*(:\d+)?/)?\w(-?\w+)*(/\w(-?\w+)*)*$")
.Matches(@"^(?:(?=[^:\/]{1,253})(?!-)[a-zA-Z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-zA-Z0-9-]{1,63}(?<!-))*(?::[0-9]{1,5})?/)?((?![._-])(?:[a-z0-9._-]*)(?<![._-])(?:/(?![._-])[a-z0-9._-]*(?<![._-]))*)$")
.WithMessage("Invalid Docker reference");
}

Expand Down

0 comments on commit 7266622

Please sign in to comment.