/*
* addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class)
* .addValidator(UsernameValidator.class, 3, 30));
*/
addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class).addValidator(
UserConfigurableValidator.class, UserConfigurableValidator.USERNAME));
addUIFormInput(new UIFormStringInput(PASSWORD, PASSWORD, null).setType(UIFormStringInput.PASSWORD_TYPE)
.addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class, 6, 30));
addUIFormInput(new UIFormStringInput(CONFIRM_PASSWORD, CONFIRM_PASSWORD, null).setType(UIFormStringInput.PASSWORD_TYPE)
.addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class, 6, 30));
addUIFormInput(new UIFormStringInput(FIRST_NAME, FIRST_NAME, null).addValidator(StringLengthValidator.class, 1, 45)
.addValidator(MandatoryValidator.class).addValidator(PersonalNameValidator.class));
addUIFormInput(new UIFormStringInput(LAST_NAME, LAST_NAME, null).addValidator(StringLengthValidator.class, 1, 45)
.addValidator(MandatoryValidator.class).addValidator(PersonalNameValidator.class));
addUIFormInput(new UIFormStringInput(DISPLAY_NAME, DISPLAY_NAME, null).addValidator(StringLengthValidator.class, 0, 90)
.addValidator(UserConfigurableValidator.class, "displayname",
UserConfigurableValidator.KEY_PREFIX + "displayname", false));
addUIFormInput(new UIFormStringInput(EMAIL_ADDRESS, EMAIL_ADDRESS, null).addValidator(MandatoryValidator.class)
.addValidator(UserConfigurableValidator.class, UserConfigurableValidator.EMAIL));
// Never use captcha if skipCaptcha is true. Otherwise read value from portlet property
boolean useCaptcha;
if (skipCaptcha) {