* Allow `-' in release set names.

This commit is contained in:
Eelco Dolstra 2009-03-20 15:19:17 +00:00
parent 2755c895ff
commit 3d26bb7fd1

View file

@ -101,7 +101,7 @@ sub updateReleaseSet {
my ($c, $releaseSet) = @_;
my $releaseSetName = trim $c->request->params->{name};
die "Invalid release set name: $releaseSetName" unless $releaseSetName =~ /^[[:alpha:]]\w*$/;
die "Invalid release set name: $releaseSetName" unless $releaseSetName =~ /^[[:alpha:]][\w\-]*$/;
$releaseSet->update(
{ name => $releaseSetName
@ -117,7 +117,7 @@ sub updateReleaseSet {
my $description = trim $c->request->params->{"job-$baseName-description"};
my $attrs = trim $c->request->params->{"job-$baseName-attrs"};
$name =~ /^(\w+):(\w+)$/ or error($c, "Invalid job name: $name");
$name =~ /^([\w\-]+):([\w\-]+)$/ or error($c, "Invalid job name: $name");
my $jobsetName = $1;
my $jobName = $2;