my $wpid = $c->req->param('wpid');
if ( $wpid eq 'new'){
- unless ($c->req->param('name') =~ /([A-Z]\w*)/){
+ unless ($c->req->param('name') =~ /^([A-Z]\w*)$/){
die 'The name is not valid, start with a capital letter and only use alphanumerical characters or _ for the rest';
}
my $namespace = $dbh->selectrow_array(q{SELECT namespace