liferay-portal-6.1.0-ce-ga1 with tomcat-7.0.23 and Hypersonic
1. Use MinimalAssetEntryValidator as validation class in portal-ext.properties
Input a class name that extends
com.liferay.portlet.asset.util.BaseAssetEntryValidator. This class will be
called to validate entries. The DefaultAssetEntryValidator class is just
an empty class that doesn't actually do any validation. The
MinimalAssetEntryValidator requires all entities to have at least one tag.
2. Put Asset Publisher Portlet on Page
3. Add New Basic Web Content or any other
4. Fill out required fields
5. Add at least one tag
6. Save will throw error that at least one tag must be specified
Debugging the code:
The validate method is called twice when at least one tag is added to the asset. First call is ok and the tagNames String is valid, but in the second call the tagNames String is null and thus the validation fails.
If no tag is added to the asset, the tagNames String is not null and empty throwing the Validation Exception as expected, also the method is only called once.
I didn't get further why the method is called twice. Might also affect custom validation classes.