<%method title>Register <%method headline>Register: ARGS = <% sort keys %ARGS %> @form::err = <% @form::err %>
% # treat any errors % if (@form::err) {

The following errors were encountered:

% }

Please register:

Username:
New password:
Confirm password:
Email:

<%init> @form::err = (); # if a SUBMIT button, check form input push (@form::err, "INIT"); if ($ARGS{submit}) { push (@form::err, "SUBMIT present"); } <%doc> if ($ARGS{submit}) { push (@err, "SUBMIT present"); # check for required input push (@err, "Username is required") unless $ARGS{Username}; push (@err, "Password is required") unless $ARGS{Password}; push (@err, "Password must be entered twice") unless $ARGS{Password2}; push (@err, "Email is required") unless $ARGS{Email}; # check for heinous input push (@err, "Passwords must exactly match") unless $ARGS{Password} eq $ARGS{Password2}; # $m->redirect('/user/welcome.html'); } # otherwise just present a blank form for input