Simple javascript from validator