]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/output/NameInput.java
Merge "fix: ensure no blanks are entered between name parts and hyphens"
[gigi.git] / src / club / wpia / gigi / output / NameInput.java
index 516646674a55e9d947ae70601e0ecffdf519d2c2..272c06e4249a344a8ee63df3485b8ac9ba62a57c 100644 (file)
@@ -74,8 +74,11 @@ public class NameInput implements Outputable {
 
     public NamePart[] getNameParts() throws GigiApiException {
         if ("single".equals(scheme)) {
+            if (name == null || name.trim().isEmpty()) {
+                throw new GigiApiException("requires at least one character in the single name");
+            }
             return new NamePart[] {
-                    new NamePart(NamePartType.SINGLE_NAME, name)
+                    new NamePart(NamePartType.SINGLE_NAME, name.trim())
             };
         }
         String[] fparts = split(fname);