Red Hat Bugzilla – Bug 868016
Feature request - Make email validation pluggable by user's custom rule in EPP 6.
Last modified: 2013-11-07 09:25:28 EST
The current EPP 5.2.2 has a default rule to validate email address. Here is the source code http://anonsvn.jboss.org/repos/gatein/epp/portal/tags/EPP_5_2_2_GA/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java
private boolean validateLocalPart(char localPart)
if(localPart.length == 0 || !Character.isLetter(localPart) || !Character.isLetterOrDigit(localPart[localPart.length - 1]))
for(int i = 1; i < localPart.length -1; i++)
char c = localPart[i];
char next = localPart[i+1];
if(Character.isLetterOrDigit(c) || (isLocalPartSymbol(c) && Character.isLetterOrDigit(next)))
It only allow letter, digit and symbols "." and "_" in the local part. It also forces the first character to be letter and the last character to be letter or digit.
1) Can we review the validation rule? Are we following any spec for the validation rule?
2) Can we create a mechanism in EPP 6 that allows user to plug in their own custom validation rule such as regular expression as we've done for username/groupmembership?
Implemented upstream. Documentation remaining.
Since this was just an extension of existing solution, just a very minor addition to documentation was needed. It's done here:
Verified in er02