##C, 112 bytes <!-- language: lang:c --> j,i,k,l;f(char*s){l=strlen(s);for(i=l;j<l;)k+=(s[j++]-48)*(i>1?i--:-1);return!(k%11)&&(k!=0)&&((l==9)||(l==8));} Returns 0 if invalid, 1 if valid. <a href="https://tio.run/nexus/c-gcc#FcpLDoIwEADQvbeABDJD28QBF2itHsS4IAqxH6tp6wo8e5XV27xsuOaWOznB7TGEJuLsVEzBjR4iyukVQCsnzdFJtExBvBjGrmLXYwP6RGctxEEQyjCmT/AF2IoI6xpsobar4JTa47Ks9ojyu3kO2gPO76B9mqCs7iX/Q0Rt23ZdV64p5x8" title="C (gcc) – TIO Nexus">Try it online!</a>