So the service above returns our information in a form that we can use. We're essentially going to translate this information into the Regula framework. To do this, we need to write a tag. The tag goes through the gathered information and figures out the property name, the constraints attached to the property, and the parameters to the constraints. The tag also figures out the composing constraints for compound constraints and translates that to Regula compound-constraints:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="string" uri="http://regula-spring" %>
This tag also takes care of binding the submit handler (using jQuery), which runs the validation on submit and displays error messages if any. If you need to do anything more complicated, you can override the submit handler.
That's pretty much it. In another blog post, I'll talk about actually using the integration.