Skip to content

Commit da1781a

Browse files
committed
Fix URL format validation for projects with periods
1 parent 34b1c2f commit da1781a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/github_project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class GithubProject
22
include ActiveModel::API
33

44
attr_accessor :url, :commit
5-
validates_format_of :url, with: %r{\Ahttps://github.com/[a-z0-9\-_]+/[a-z0-9\-_]+\z}i
5+
validates_format_of :url, with: %r{\Ahttps://github.com/[a-z0-9\-_\.]+/[a-z0-9\-_\.]+\z}i
66
validates_format_of :commit, with: /\A[0-9a-z_\.-]{1,40}\z/i, allow_blank: true
77

88
def owner

0 commit comments

Comments
 (0)