[5.0] Use Container contract in validation component

More decoupling... ;)

I also added a previously missing class attribute to the `Validator` class.