on 01-08-2008 9:16 AM
Hi All,
I need to edit the User Profile application in Portal,which is available in Personalize option. Here are the things need to do on the application
I need to disable the email address option.
or
when user enters the mail id which is not in the domain like
our company domain is user@abc.com, when the user enters mail id like user@gmail.com, it should not allow user to save the mail.
How to control this. As I know this can controled in the webdynpro application. where to get that application.
If anyone have an idea please help me.
Thanks in advance.
Regards
Ponnusamy P
Hi,
You can use the following code to validate the email ID:
static final String expression = "(
s|>|^)(?!(:|www
.|
.))[A-Za-z0-9_.-]@([A-Za-z0-9_-]
.)+[A-Za-z]{2,4}(
s|
W|_|<|$)";
public boolean validateEmailId( java.lang.String emailId )
{
//@@begin validateEmailId()
java.util.regex.Pattern pattern;
String value = null;
boolean isValid = false;
try {
value = emailId.toString();
pattern = java.util.regex.Pattern.compile(expression);
isValid = pattern.matcher(value).matches();
} catch (Exception e) {
}
return isValid;
//@@end
}
Now if this method returns false then display a message to the user that "Please enter a valid Email ID" else allow the user to save the data.
Hope this will solve your problem.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.