mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Add anchor to the start of preg_match()
Should have added these with bf631682
This commit is contained in:
parent
19032b0bc2
commit
79533398ef
1 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ class Contributor{
|
|||
}
|
||||
|
||||
if(isset($this->WikipediaUrl)){
|
||||
if(!preg_match('|https://.*wiki.*|ius', $this->WikipediaUrl)){
|
||||
if(!preg_match('|^https://.*wiki.*|ius', $this->WikipediaUrl)){
|
||||
$error->Add(new Exceptions\InvalidContributorWikipediaUrlException('Invalid Contributor WikipediaUrl: ' . $this->WikipediaUrl));
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ class Contributor{
|
|||
}
|
||||
|
||||
if(isset($this->NacoafUrl)){
|
||||
if(!preg_match('|https?://id\.loc\.gov/.*|ius', $this->NacoafUrl)){
|
||||
if(!preg_match('|^https?://id\.loc\.gov/.*|ius', $this->NacoafUrl)){
|
||||
$error->Add(new Exceptions\InvalidContributorNacoafUrlException('Invalid Contributor NacoafUrl: ' . $this->NacoafUrl));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue