moved field validation functionality to seperate file