Hi,
I'm trying to override Liferay's liberal validator (I need screenNames supporting accented characters).
I started a new Hook Plugin project from eclipse IDE, created a package
com.mycompany.classes and then a class MyValidator containing the following code :
1
2
3package com.mycompany.classes;
4
5import com.liferay.portal.security.auth.LiberalScreenNameValidator;
6
7public class MyValidator extends LiberalScreenNameValidator {
8
9 @Override
10 public boolean validate(long companyId, String screenName) {
11
12 if(super.validate(companyId, screenName))
13 return true;
14 else {
15
16 if(screenName.contains("é"))
17 return true;
18 else
19 return false;
20
21 }
22
23 }
24
25}
I installed the plugin and then rebooted Liferay with the parameter :
1users.screen.name.validator=com.mycompany.classes.MyValidador
Unfortunately, when I try to add a user containing the letter "é", I got a Java error :
112:04:33,827 ERROR [ScreenNameValidatorFactory:42] java.lang.ClassNotFoundException: com.mycompany.classes.MyValidator
I know this must be a newbie question but I can't figure out what's wrong.
Thanks for your help!
Édouard
Please sign in to flag this as inappropriate.