I am creating a form that posts data to a external url (authorizeNet DPM). I need jsf to validate the inputText prior to allowing the submission to happen. How do I get the validation rules to work in this case?
<form action="EXTERNAL_URL" method="POST">
<h:inputText id="x_card_num" required="true" requiredMessage="A 16-digit credit card number is required.">
<f:ajax event="change" render="@this" />
<f:validateLength maximum="20" minimum="3" />
<f:validateRegex pattern="[0-9]{16}" />
</h:inputText>
<h:commandButton value="Submit" id="submit"/>
</form>