pagelets/nodejitsu/creditcard/base.js
function digit(event) {
    var element = event.element
      , code = event.keyCode || event.which
      , result;

    result = (code >= 48 && code <= 57) || code === 8 || code === 46;
    if (!result) event.preventDefault();

    return {
      allowed: result,
      code: code,
      removal: code === 8 || code === 48
    };
  }
function digit(event) {
    var element = event.element
      , code = event.keyCode || event.which
      , result;

    result = (code >= 48 && code <= 57) || code === 8 || code === 46;
    if (!result) event.preventDefault();

    return {
      allowed: result,
      code: code,
      removal: code === 8 || code === 48
    };
  }
function digit ( event ) { var element = event . element , code = event . keyCode || event . which , result ; result = ( code >= 48 && code <= 57 ) || code === 8 || code === 46 ; if ( ! result ) event . preventDefault ( ) ; return { allowed : result , code : code , removal : code === 8 || code === 48 } ; }
Only allow numbers in the number field.

@api private
Only allow numbers in the number field .