diff options
Diffstat (limited to 'usr/src/libpiny/lib/Piny/User.pm')
-rw-r--r-- | usr/src/libpiny/lib/Piny/User.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/libpiny/lib/Piny/User.pm b/usr/src/libpiny/lib/Piny/User.pm index 173b592..fb9a20f 100644 --- a/usr/src/libpiny/lib/Piny/User.pm +++ b/usr/src/libpiny/lib/Piny/User.pm @@ -13,10 +13,12 @@ use Piny::Group; subtype 'Username' => as 'Str' - => where { $_ =~ /^(?!(git|ikiwiki)-)[[a-zA-Z][a-zA-Z0-9_.-]*$/ } + => where { $_ =~ /^(?!(git|ikiwiki)-)[a-zA-Z][a-zA-Z0-9_.-]*$/ } => message { 'That username is not in the correct format for a piny user.' } ; +Moose::Util::TypeConstraints::export_type_constraints_as_functions; + # Attributes has 'uid' => |