Mod-10 number validation algorithm (modulo 10)

HI!
I’m looking for a Mod-10 (modulo 10) validation algorithm writen in actionscript.
From a text-field, the user will enter a code and on submit, actionscript will validate if the number is right.
Does anyone know this algorithm ?
Thanks.