JSF & PrimeFaces & Spring tutorial 15: JSF Validation With Hibernate Validator

Validating domain objects with JSF and Hibernate Validation (Bean Validation)

download result: https://app.box.com/s/arrfjgklhqp2xr8gmmpi

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.URL;

import lombok.Getter;
import lombok.Setter;

public class Check {

	private int id;

	@Size(min = 1, message = "Name cannot be empty!")
	private String name;

	@Size(min = 1, message = "URL cannot be empty!")
	@URL(message = "Invalid URL!")
	private String url;