dfdfdf

 // phone format check
 var phone = felixdef.getAttribute('phone.format');
 if (phone != null && phone.toUpperCase() == 'TRUE') {
  if (! phoneFormat(value)) {
   felixhint.innerHTML = errors.show('errors.phone', display);
   return false;
  }
 }
 
 // afterToday format check
 var afterToday = felixdef.getAttribute('afterToday.format');
 if (afterToday != null && afterToday.toUpperCase() == 'TRUE') {
  if (! afterTodayFomart(value)) {
   felixhint.innerHTML = errors.show('errors.lessThanToday', display);
   return false;
  }
 }
 
  // only fig and letter format check
 var numberletter = felixdef.getAttribute('only.numberletter');
 if (numberletter != null && numberletter.toUpperCase() == 'TRUE') {
  if (! checknumberletter(value)) {
   felixhint.innerHTML = errors.show('errors.numberletter', display);
   return false;
  }
 }

 // extra check
 var extra = felixdef.getAttribute('extra');
 if (extra != null) {
  var extrafunc = trim(extra);
  if (extrafunc.indexOf('(') == -1) {
   extrafunc += '(control)';
  }
  try {
   var extraresult = eval(extrafunc);
   if (extraresult != null) {
    if (isArray(extraresult)) {
     var param = new Array;
     for (var i=0; i < extraresult.length-1; i++) {
      param[i] = extraresult[i+1];
     }
     felixhint.innerHTML = errors.show(extraresult[0], param);
    } else {
     felixhint.innerHTML = errors.show(extraresult, display);
    }
    return false;
   }
  } catch(e) {}
 }

 // final return
 return true;
}

你可能感兴趣的:(dfsfd)