add form validation to config form.