For any normal purpose a dedicated 230V indicator light is better in every way, though here the OP wanted to experiment.
Doing so with a 24V AC transformer's output would be safer obviously! Just in case any readers are thinking of doing something similar...
Doing so with a 24V AC transformer's output would be safer obviously! Just in case any readers are thinking of doing something similar...