[js] validation