now using angular 1.3 ngModelController.$validate() method.