js validation on entry