throw new BadRequestException( locale.getString("www.error.missingField") );
if ( !pass1.equals(pass2) )
throw new BadRequestException( locale.getString("www.error.passwordsDontMatch") );
if ( !v.isValidEmail(email) )
throw new BadRequestException( locale.getString("www.error.invalidEmail") );
if ( v.usernameExists(name) )
throw new BadRequestException( locale.getString("www.error.duplicateUsername") );
if ( v.emailExists(email) )
throw new BadRequestException( locale.getString("www.error.duplicateEmail") );
User newUser = new User( -1, name, pass1, email );