Skip to content

Commit 4a6334b

Browse files
committed
fix(hakiri): added \A \z to regex
1 parent 08ed5cb commit 4a6334b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/questionnaire.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Questionnaire < ApplicationRecord
4343

4444
validates :portfolio_url, url: { allow_blank: true }
4545
validates :vcs_url, url: { allow_blank: true }
46-
validates_format_of :vcs_url, with: %r{((github.com\/\w+\/?)|(gitlab.com\/\w+\/?)|(bitbucket.org\/\w+\/?))}, allow_blank: true, message: "Must be a GitHub, GitLab or Bitbucket url"
46+
validates_format_of :vcs_url, with: %r{\A((github.com\/\w+\/?)|(gitlab.com\/\w+\/?)|(bitbucket.org\/\w+\/?))\z}, allow_blank: true, message: "Must be a GitHub, GitLab or Bitbucket url"
4747

4848
strip_attributes
4949

0 commit comments

Comments
 (0)