validation for DynamicForm