Added ListSerializer.validate().

Closes #2168.
Closes #2225.

Based on @Ian-Foote's initial work, with some refactorings.