Add simple JavaScript validation