Foros de discusión

server side custom validation

Sneha Jajoo, modificado hace 9 años.

server side custom validation

New Member Mensajes: 12 Fecha de incorporación: 9/06/14 Mensajes recientes
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, modificado hace 9 años.

RE: server side custom validation

Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
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!