Add some JavaScript validation