Permalink
Browse files

Word validation should return false if any non-word characters are pr…

…esent.
  • Loading branch information...
1 parent c45f6dd commit c1fa4994c29643280aa01e0080acaa2a9c3de3d3 @johnpbloch johnpbloch committed May 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Class/Core/Validation.php
View
2 Class/Core/Validation.php
@@ -315,7 +315,7 @@ protected function email_rule($data)
*/
protected function word_rule($data)
{
- return preg_match("/\W/", $data);
+ return ! preg_match("/\W/", $data);
}

0 comments on commit c1fa499

Please sign in to comment.