fixing validation material_code