Form validation example as required by Udacity.