added validity to form