validate - always need at least 1 pub/pri key pair, update validation message
@@ -4,6 +4,7 @@ import com.quorum.tessera.config.adapters.PathAdapter;
import com.quorum.tessera.config.constraints.ValidKeyData;
import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@@ -26,6 +27,7 @@ public class KeyConfiguration extends ConfigItem {
@Valid
@ValidKeyData
@NotNull
+ @Size(min = 1, message = "At least 1 public/private key pair must be provided")
private final List<KeyData> keyData;
public KeyConfiguration(final Path passwordFile, final List<String> passwords, final List<KeyData> keyData) {
