update material code validate unique