adding validation js