portfolio code validation