Author: haint
Date: 2011-10-18 22:18:42 -0400 (Tue, 18 Oct 2011)
New Revision: 7768
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterInputSet.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
Log:
GTNPORTAL-2186 update componet register and locale properties
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterInputSet.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterInputSet.java 2011-10-18
20:54:37 UTC (rev 7767)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterInputSet.java 2011-10-19
02:18:42 UTC (rev 7768)
@@ -35,9 +35,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;
/**
* @author <a href="mailto:hoang281283@gmail.com">Minh Hoang
TO</a>
@@ -66,8 +68,7 @@
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"));
+ .addValidator(UsernameValidator.class, 3, 30));
addUIFormInput(new UIFormStringInput(PASSWORD, PASSWORD,
null).setType(UIFormStringInput.PASSWORD_TYPE)
.addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class,
6, 30));
@@ -76,10 +77,10 @@
.addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class,
6, 30));
addUIFormInput(new UIFormStringInput(FIRST_NAME, FIRST_NAME,
null).addValidator(StringLengthValidator.class, 1,
- 45).addValidator(MandatoryValidator.class));
+
45).addValidator(MandatoryValidator.class).addValidator(NaturalLanguageValidator.class));
addUIFormInput(new UIFormStringInput(LAST_NAME, LAST_NAME,
null).addValidator(StringLengthValidator.class, 1,
- 45).addValidator(MandatoryValidator.class));
+
45).addValidator(MandatoryValidator.class).addValidator(NaturalLanguageValidator.class));
addUIFormInput(new UIFormStringInput(EMAIL_ADDRESS, EMAIL_ADDRESS,
null).addValidator(MandatoryValidator.class).addValidator(
EmailAddressValidator.class));
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-10-18
20:54:37 UTC (rev 7767)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-10-19
02:18:42 UTC (rev 7768)
@@ -231,6 +231,20 @@
FirstCharacterNameValidator.msg=The "{0}" field must start with a character.
FirstAndSpecialCharacterNameValidator.msg=The "{0}" field must start with a
character and must not contain special characters."
+##############################################################################
+# Username Validator
+##############################################################################
+
+LastCharacterUsernameValidator.msg=The field "{0}" must end with a character or
digit.
+ConsecutiveSymbolValidator.msg=The field "{0}" cannot contain consecutive
"{1}" and "{2}" symbols.
+UsernameValidator.msg.Invalid-char=Only alpha lower, digit, dot and underscore characters
are allowed for the field "{0}".
+
+##############################################################################
+# Natural language Validator
+##############################################################################
+
+NaturalLanguageValidator.msg.Invalid-char=Only letters or spaces are allowed for the
field "{0}"
+
#############################################################################
# Message Info #
#############################################################################
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-10-18
20:54:37 UTC (rev 7767)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-10-19
02:18:42 UTC (rev 7768)
@@ -204,6 +204,20 @@
FirstCharacterNameValidator.msg=Trường "{0}" phải bắt đầu bằng một chữ cái.
FirstAndSpecialCharacterNameValidator.msg=Trường "{0}" phải bắt đầu bằng một
chữ cái và không chứa những ký tự đặc biệt.
+##############################################################################
+# Username Validator
+##############################################################################
+
+LastCharacterUsernameValidator.msg=Trường "{0}" phải kết thúc bằng một chữ cái
hoặc một chữ số.
+ConsecutiveSymbolValidator.msg=Trường "{0}" không thể chứa các ký tự liên tiếp
" {1} " và " {2} ".
+UsernameValidator.msg.Invalid-char=Bạn chỉ được nhập dữ liệu là các chữ cái thường, chữ
số, dấu chấm vả dấu gạch chân trong mục "{0}".
+
+##############################################################################
+# Natural language Validator
+##############################################################################
+
+NaturalLanguageValidator.msg.Invalid-char=Bạn chỉ được nhập dữ liệu là chữ cái hoặc
khoảng trắng trong mục "{0}"
+
#############################################################################
# Message Info #
#############################################################################
Show replies by date