Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add some instruction to form

  • Loading branch information...
commit d74bb30ddd4e1a124df63995f0af353592059dcd 1 parent 2550b9b
@pradtke pradtke authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 SWF-1516/src/main/webapp/WEB-INF/phonebook/addNumbers.jsp
17 SWF-1516/src/main/webapp/WEB-INF/phonebook/addNumbers.jsp
@@ -11,6 +11,21 @@
<title>Phone Numbers</title>
+ <h1>Instructions</h1>
+ The model validates that the phone numbers are not empty and are equal.
+ The 'not empty' validation occurs on the fields, and the errors are reported under 'All errors'
+ and by the 'field'.
+ <br/>
+ The 'do phone numbers match' validation is a object level validation. The error message appears unde 'All errors'
+ but NOT, as expected, under 'Object level error'.
+ <br/>The javadoc for the ErrorsTag says
+ <ol>
+ <li>Field only - set '<code>path</code>' to the field name (or path)</li>
+ <li>Object errors only - omit '<code>path</code>'</li>
+ <li>All errors - set '<code>path</code>' to '<code>*</code>'</li>
+ </ol>
<h1>Phone Numbers</h1>
<form:form method="post" modelAttribute="phoneForm">
@@ -40,6 +55,8 @@
<br />
<form:label path="phone2">Repeat phone</form:label>
+ <span style="color: #f00">*</span>
<form:input path="phone2" name="phone2" />
Please sign in to comment.
Something went wrong with that request. Please try again.