validate all fields before save