First of all: Do you really need this? Usually The validation is done after each epoch (epoch = whole iteration over dataset) on the whole validation dataset.
if you really want to do it the way you did it you could define a Dataset 4 which handles train and validation data. If you do this you could use one dataloader and would get batches of always the same indices in train and validation set.

NOTE: This could lead to problems if the datasets have different sizes or you could validate the same images multiple times if you use shuffle=True (as usually done during training)