validate the length from pattern in angular code example Example: angular number validation ng-pattern="re"