code: function validateNum() {
          var pass = true,
          num = '';
  
          ['#areacode', '#phnum1', '#phnum2'].forEach(function(id) {
              var $e = $(id),
              val = $e.val();
  
              if(!val || val.length !== parseInt($e.attr('maxlength'), 10)) {
                  pass = false;
                  $e.addClass('error');
              }
              else
                  num += val;
          });
  
          if(!pass) return false;
  
          return num;
      }
docs: validate the phone number fields