Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
Add some instruction to form
Browse files Browse the repository at this point in the history
  • Loading branch information
pradtke committed Feb 3, 2012
1 parent 2550b9b commit d74bb30
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SWF-1516/src/main/webapp/WEB-INF/phonebook/addNumbers.jsp
Expand Up @@ -11,6 +11,21 @@
<title>Phone Numbers</title>
</head>
<body>
<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>
<hr>
<form:form method="post" modelAttribute="phoneForm">
Expand Down Expand Up @@ -40,6 +55,8 @@
<br />
<div>
<form:label path="phone2">Repeat phone</form:label>
<span style="color: #f00">*</span>

</div>
<div>
<form:input path="phone2" name="phone2" />
Expand Down

0 comments on commit d74bb30

Please sign in to comment.