return reply 'Parameter too long' if grep { length > 200 } values %_;
return reply 'Bad username. Allowed characters are letters, digits and underscores, and the username must be between 2 and 20 characters long.' unless $_{username} =~ USER_REGEX;
return reply 'Username already in use' if db->user($_{username});
return reply 'The two passwords do not match' unless $_{password} eq $_{confirm_password};
return reply 'Parameter too long' if grep { length > 200 } values %_;
return reply 'Bad username. Allowed characters are letters, digits and underscores, and the username must be between 2 and 20 characters long.' unless $_{username} =~ USER_REGEX;
return reply 'Username already in use' if db->user($_{username});
return reply 'The two passwords do not match' unless $_{password} eq $_{confirm_password};