Adding form validation.