Some improvements to js validators