added validation js