Just let the input required attribute check the value of the flag.
Here is an example run:
<h:form> <h:dataTable value="#{bean.list}" var="item"> <h:column><h:selectBooleanCheckbox binding="#{checkbox}" /></h:column> <h:column><h:inputText id="input" value="#{item.value}" required="#{checkbox.value == 'true'}" /></h:column> <h:column><h:message for="input" /></h:column> </h:dataTable> <h:commandButton value="submit" action="#{bean.submit}" /> </h:form>
source share