diff --git a/core/src/main/java/com/github/clagomess/pirilampo/core/dto/ParametersDto.java b/core/src/main/java/com/github/clagomess/pirilampo/core/dto/ParametersDto.java index 2094834..e29c4a9 100644 --- a/core/src/main/java/com/github/clagomess/pirilampo/core/dto/ParametersDto.java +++ b/core/src/main/java/com/github/clagomess/pirilampo/core/dto/ParametersDto.java @@ -11,6 +11,7 @@ import java.io.File; import java.util.Arrays; +import java.util.regex.Pattern; @Data @NoArgsConstructor @@ -40,8 +41,15 @@ public void validate() throws ParametersException { if(layoutPdf == null) throw ParametersException.required("Layout PDF"); if(htmlPanelToggle == null) throw ParametersException.required("HTML Panel Toggle"); - //@TODO: menuColor - //@TODO: menuTextColor + if(menuColor == null) throw ParametersException.required("Menu Color"); + if(!Pattern.compile("^#[A-Fa-f0-9]{6}$").matcher(menuColor).find()){ + throw new ParametersException("Option