Angular 1.3 introduced the ability to bind validation expressions using the ng-pattern directive. Here is a quick description of how to use it.
Prior to 1.3 ng-pattern was not backed by a directive, so it could only work with hard coded expressions in the markup. This made it hard to reuse and unit test expressions since there was no way to define the actual expressions outside of the markup.
The code listing below show how to set it up: