Basic JS validation