Skip to content

Commit

Permalink
Fixed broken alphaNumericDash validation
Browse files Browse the repository at this point in the history
  • Loading branch information
susanBuck committed Nov 29, 2021
1 parent 9298ead commit ab96508
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@ protected function alphaNumericMessage()
*/
protected function alphaNumericDash($value)
{
if (! ctype_alnum(str_replace(' ', '', $value))) {
return false;
}

return preg_match('/^[\pL\pM\pN_-].+$/u', $value) > 0;
return ctype_alnum(str_replace([' ', '-', '_'], '', $value));
}

protected function alphaNumericDashMessage()
Expand Down

0 comments on commit ab96508

Please sign in to comment.