Regular Expression Validation in JSF
When most people look at the list of components in ADF Faces they mostly focus on the visual components - and that's understandable, but if you look closer you'll find that there are also non-visual components included such as several validators.
Here is an example of one useful validator - the regular expression validator.
Let's suppose that you want your JSF field to allow only Numeric values - all you need to do is add to it the ADF Faces provided regular expression validator and then provide the right regex format.
For Example:
<af:inputText label="Label 1" autoSubmit="true">
<af:validateRegExp pattern="[0-9]{1,10}"
noMatchMessageDetail="Only Numbers Please"/>
</af:inputText>
<af:commandButton text="commandButton 1"/>
Now run your page and try entering characters to the field and leaving it.
You'll immediately get an error message with the text you provided (implemented using Javascript).
Just one more thing that ADF Faces give you to make life easier...