add material type validation js