Adding dynamic form validation