adds validity checks to web page