An abstract validator for validating unique collection