private boolean captchaInputAvailability;
public UIRegisterInputSet(String name) throws Exception{
super(name);
addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class)
.addValidator(StringLengthValidator.class, 3, 30).addValidator(ResourceValidator.class)
.addValidator(ExpressionValidator.class, "^[\\p{L}][\\p{L}._\\-\\d]+$", "ResourceValidator.msg.Invalid-char"));
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));
addUIFormInput(new UIFormStringInput(LAST_NAME, LAST_NAME, null).addValidator(StringLengthValidator.class, 1,
45).addValidator(MandatoryValidator.class));
addUIFormInput(new UIFormStringInput(EMAIL_ADDRESS, EMAIL_ADDRESS, null).addValidator(MandatoryValidator.class).addValidator(
EmailAddressValidator.class));
PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
PortletPreferences pref = pcontext.getRequest().getPreferences();
boolean useCaptcha = Boolean.parseBoolean(pref.getValue(UIRegisterEditMode.USE_CAPTCHA,"true"));