front end validation