Forums de discussion

server side custom validation

Sneha Jajoo, modifié il y a 9 années.

server side custom validation

New Member Publications: 12 Date d'inscription: 09/06/14 Publications récentes
I am developing spring portlet using liferay 6.2, I need to validate the fields on server side .I am able to validate it for not empty using org.hibernate.validator.constraints.NotEmpty; validator annotation @Not Empty.

I want custom validation for fields should have valid data. For example First name should have alphabets only .
How to implement this custom validation .

Please guide.

Thanks,
Sneha
thumbnail
Manali Lalaji, modifié il y a 9 années.

RE: server side custom validation

Expert Publications: 362 Date d'inscription: 09/03/10 Publications récentes
Hi,

It seems you are using BeanValidation.
If you want to use Hibernate Validators for the same, you need to create custom constraint for First name.

Refer some links: link1, link2

HTH!