add front-end validation for the first page