JS validation working fine now