That's not a supported configuration.
But, some people have reported that it works fine.
There is a trick... most phones can't BE the WiFi network and act like they are ON the network at the same time.
So, you will probably need another device
Turn on the WiFi hotspot on your phone to make a new network (note: this HAS to have full internet access)
Connect your other device to your phone hotspot
Use the other device to setup your Chromecast to use the phone hotspot
Use the other device to cast to your Chromecast
A couple more warnings... as I said, your hotspot has to have internet access. Chromecasts require this even when you are casting local content. Be warned that Chromecasts can use a LOT of data quickly. Because of this, speed of connection is important. Even if you have "unlimited data", some providers throttle phone data speeds when you do a lot of data. This will impact the quality of your casting or cause a lot of stutters.