Implemented tan validation