Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: Documentation
-
Labels:None
-
Environment:n/a
Description
pdf documentation version 1-1: pages 222-223
listing 13-42: --- \# schema.yml \# ... User: columns: username: type: string(255) regexp: '/[a-zA-Z0-9]/' \# ... listing 13-43: // test.php // ... $user = new User(); $user->username = '[jwage'; if ( ! $user->isValid()) { echo 'User is invalid because the username contains a [ character'; }
is this correct?
or would the regex need to be: "/^[a-zA-Z0-9]+$/"
..seems that since the username "[jwage" contains at least one character in the set, it should match against the regex
..I probably shouldn't even ask.. being brand new to Doctrine. But it feels like a small documentation mistake when reading it. Thought I'd pass it along to someone who knows better. Thanks.