Tags now allow dots

This commit is contained in:
Marcin Kurczewski 2013-10-20 12:07:12 +02:00
parent 688385d553
commit 4bfa2a019a

View file

@ -37,7 +37,7 @@ class Model_Tag extends RedBean_SimpleModel
if (strlen($tag) > $maxLength) if (strlen($tag) > $maxLength)
throw new SimpleException('Tag must have at most ' . $maxLength . ' characters'); throw new SimpleException('Tag must have at most ' . $maxLength . ' characters');
if (!preg_match('/^[a-zA-Z0-9_-]+$/i', $tag)) if (!preg_match('/^[a-zA-Z0-9_.-]+$/i', $tag))
throw new SimpleException('Invalid tag "' . $tag . '"'); throw new SimpleException('Invalid tag "' . $tag . '"');
return $tag; return $tag;