Added validation to form.