added test for form validation integration and fixed related issues