Vì Vinoth cho biết bạn có thể áp dụng các lớp CSS để thay đổi giao diện của thông báo lỗi. Ngoài ra, các thư Stripes có thể được tùy chỉnh hoàn toàn bằng cách chỉnh sửa StripesResources.properties
.
Tại đây bạn có thể xác định chính xác thư của bạn sẽ trông như thế nào, sử dụng các lớp đánh dấu và CSS hoặc thậm chí là kiểu nội tuyến.
# Resource strings used by the <stripes:errors> tag when there are no nested tags
stripes.errors.header=<div class="my-error-wrapper"><h4>Ooops... some things went awfully awry:/h4><ol>
stripes.errors.beforeError=<li><i class="fa fa-warning"></i>
stripes.errors.afterError=</li>
stripes.errors.footer=</ol></div>
# Resource strings used by the <stripes:errors> tag when displaying errors for a
# specific field (e.g. <stripes:errors field="password"/>). If not supplied the
# values above will be used instead.
stripes.fieldErrors.header=
stripes.fieldErrors.beforeError=<span class="my-error-inline"><i class="fa fa-warning"></i>
stripes.fieldErrors.afterError=</span>
stripes.fieldErrors.footer=
# Resource strings used by the stripes:messages tag
stripes.messages.header=<div class="my-message-wrapper"><ul>
stripes.messages.beforeMessage=<li>
stripes.messages.afterMessage=</li>
stripes.messages.footer=</ul></div>
Như bạn thấy, bạn có thể bổ sung thêm thứ ưa thích như FontAwesome biểu tượng (thừa nhận, điều này đi xa hơn một chút so với OP yêu cầu).
Đi qua [PDF] này (http://media.pragprog.com/titles/fdstr/errormessages.pdf). Có thể hữu ích. –
đó là giao diện người dùng quyết định cách hiển thị thông báo lỗi, chứ không phải xác thực – Stultuske