diff --git a/src/main/java/org/springframework/samples/petclinic/Visit.java b/src/main/java/org/springframework/samples/petclinic/Visit.java
index 30b38b412..72227ae06 100644
--- a/src/main/java/org/springframework/samples/petclinic/Visit.java
+++ b/src/main/java/org/springframework/samples/petclinic/Visit.java
@@ -5,10 +5,9 @@ import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
import org.hibernate.annotations.Type;
+import org.hibernate.validator.constraints.NotEmpty;
import org.joda.time.DateTime;
import org.springframework.format.annotation.DateTimeFormat;
@@ -27,7 +26,7 @@ public class Visit extends BaseEntity {
private DateTime date;
/** Holds value of property description. */
- @NotNull @Size(min = 1)
+ @NotEmpty
@Column(name="description")
private String description;
diff --git a/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp b/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp
index 87025b805..043814eaa 100644
--- a/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp
+++ b/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp
@@ -3,6 +3,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
@@ -21,68 +22,22 @@
New Owner
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp
index 80042eec6..8e114c3ef 100644
--- a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp
+++ b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp
@@ -1,6 +1,7 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
@@ -36,20 +37,8 @@
-
-
+
+
diff --git a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp
index f073b55a0..80f7f0d0a 100644
--- a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp
+++ b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp
@@ -17,9 +17,8 @@
-
New Visit:
+
New Visit
-
Pet
-
+
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/tags/inputField.tag b/src/main/webapp/WEB-INF/tags/inputField.tag
new file mode 100644
index 000000000..f70cf36e1
--- /dev/null
+++ b/src/main/webapp/WEB-INF/tags/inputField.tag
@@ -0,0 +1,16 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<%@ attribute name="name" required="true" rtexprvalue="true" description="Name of corresponding property in bean object"%>
+<%@ attribute name="label" required="true" rtexprvalue="true" description="Label appears in red color if input is considered as invalid after submission"%>
+
+
+
+
+
+
+
+ ${status.errorMessage}
+
+
+
\ No newline at end of file