Added validation to subject code