edit js validation