<%@page contentType="text/html;charset=UTF-8"%> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> <%@ taglib prefix="s" uri="http://shale.apache.org/core" %> <%@ taglib prefix="val" uri="http://shale.apache.org/validator" %> <%@ taglib prefix="vc" uri="http://shale.apache.org/view" %> <%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <%@include file="../messages.jspf"%> <h:outputText value="#{messages['validate.test.title']}"/>



The second part of this example doesn't match the credit card example above. The goal was to show client side validation using multiple html forms on the same page.

This example lists some procedures in a dataTable. The billed amount must be within the allowable range for each procedure. We are demonstrating client side validation within a dataTable. Another interesting twist is that the variables used in the validation of each row are defined using a value binding expression and are specific to the procedure.







The third part of this example deals with using custom validation rules. Priority must be an even integer.