only validation javascript, better code