(Backends) Add new Validator class. Move the check of the top-level
network in it. Add a method to check the validity between repeat and
connection size.