Apply feature update to validate.js from integrate git hub post.

Applied the change in the below post from Integrate. We need this in our project and he hadn't generated a pull request. 

https://github.com/angular-ui/ui-utils/issues/76