Author: haint
Date: 2011-11-06 21:26:05 -0500 (Sun, 06 Nov 2011)
New Revision: 7988
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
Log:
GTNPORTAL-2260 Validators are different in User Register screens
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
===================================================================
---
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2011-11-07
01:46:43 UTC (rev 7987)
+++
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2011-11-07
02:26:05 UTC (rev 7988)
@@ -32,9 +32,11 @@
import org.exoplatform.webui.form.validator.EmailAddressValidator;
import org.exoplatform.webui.form.validator.ExpressionValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.exoplatform.webui.form.validator.NaturalLanguageValidator;
import org.exoplatform.webui.form.validator.PasswordStringLengthValidator;
import org.exoplatform.webui.form.validator.ResourceValidator;
import org.exoplatform.webui.form.validator.StringLengthValidator;
+import org.exoplatform.webui.form.validator.UsernameValidator;
/**
* Created by The eXo Platform SARL
@@ -59,18 +61,21 @@
public UIAccountInputSet(String name) throws Exception
{
super(name);
- //setComponentConfig(getClass(), null) ;
addUIFormInput(new UIFormStringInput(USERNAME, "userName",
null).addValidator(MandatoryValidator.class)
- .addValidator(StringLengthValidator.class, 3,
30).addValidator(ResourceValidator.class).addValidator(
- ExpressionValidator.class, Utils.USER_NAME_VALIDATOR_REGEX,
"ResourceValidator.msg.Invalid-char"));
+ .addValidator(UsernameValidator.class, 3, 30));
+
addUIFormInput(new UIFormStringInput(PASSWORD1X, "password",
null).setType(UIFormStringInput.PASSWORD_TYPE)
.addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class,
6, 30));
+
addUIFormInput(new UIFormStringInput(PASSWORD2X, "password",
null).setType(UIFormStringInput.PASSWORD_TYPE)
.addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class,
6, 30));
+
addUIFormInput(new UIFormStringInput("firstName", "firstName",
null).addValidator(StringLengthValidator.class, 1,
- 45).addValidator(MandatoryValidator.class));
+
45).addValidator(MandatoryValidator.class).addValidator(NaturalLanguageValidator.class));
+
addUIFormInput(new UIFormStringInput("lastName", "lastName",
null).addValidator(StringLengthValidator.class, 1,
- 45).addValidator(MandatoryValidator.class));
+
45).addValidator(MandatoryValidator.class).addValidator(NaturalLanguageValidator.class));
+
addUIFormInput(new UIFormStringInput("email", "email",
null).addValidator(MandatoryValidator.class).addValidator(
EmailAddressValidator.class));
}
Show replies by date