wip: javascript validation