Skip to content

Commit

Permalink
Dev: Question code (title) validation don't accept unique alpha caracter
Browse files Browse the repository at this point in the history
Dev: Question code accept no alphanum when importing
  • Loading branch information
Shnoulle committed Jan 2, 2014
1 parent 89f35b5 commit aefe329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/models/Question.php
Expand Up @@ -109,7 +109,7 @@ public function rules()
)
),
'message' => 'Question codes must be unique.'),
array('title', 'match', 'pattern' => '/[a-z,A-Z][[:alnum:]]+/', 'message' => 'Question codes must start with a letter and may only contain alphanumeric characters.', 'on' => 'update, insert, import'),
array('title', 'match', 'pattern' => '/^[a-z,A-Z][[:alnum:]]*$/', 'message' => 'Question codes must start with a letter and may only contain alphanumeric characters.', 'on' => 'update, insert, import'),
));
return $aRules;
}
Expand Down

0 comments on commit aefe329

Please sign in to comment.