Fix validation bug, replaced alert with console, and updated HTML sample