Skip to content

Commit

Permalink
Merge pull request #89 from TwistPHP/hotfix-domain-validation
Browse files Browse the repository at this point in the history
Fixed host name validation
  • Loading branch information
ahosgood committed Apr 9, 2016
2 parents f055bb0 + 785ad3a commit 76bb875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/twist/Core/Utilities/Validate.utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function email($strEmailAddress){
* @return mixed The returned data will either be the validated domain or false
*/
public function domain($strDomain){
return $this->regx($strDomain,"/^(locahost|([a-z\d]([a-z\d\-\_]+[a-z\d])*\.)*([a-z\d]([a-z\d\-\_]+[a-z\d])*)(\.[a-z]+)+)$/i");
return $this->regx($strDomain,"/^(localhost|([a-z\d]([a-z\d\-\_]*[a-z\d]+|)[\.]?)+(\.[a-z]+)+)$/i");
}

/**
Expand Down

0 comments on commit 76bb875

Please sign in to comment.