Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class FileAnalysisTaskPipelineImpl extends TaskPipelineImpl<FileAnalysisT
private static final List<Field<?>> _defaultFields = List.of(
new TextField("location", "Location to Watch", "./", false, null, LOCATION_HELP_TEXT, LOCATION_HREF),
new CheckboxField("recursive", "Include Child Folders", false, false),
new TextField("filePattern", "File Pattern", "(^\\D*)\\.(?:tsv|txt|xls|xlsx)", false, null, FILE_PATTERN_HELP_TEXT, FILE_PATTERN_HREF),
new TextField("filePattern", "File Pattern", "(^\\D*)\\.(?:tsv|txt|xls|xlsx)", true, null, FILE_PATTERN_HELP_TEXT, FILE_PATTERN_HREF),
new NumberField("quiet", "Quiet Period (Seconds)", null, true, 1.0, QUIET_HELP_TEXT, QUIET_HREF),
new TextField("moveContainer", "Move to Container", "/Other Project/Subfolder A", false, null, MOVE_CONTAINER_HELP_TEXT, MOVE_CONTAINER_HREF),
new TextField("moveDirectory", "Move to Subdirectory", "My Watched Files/Move", false, null, MOVE_DIRECTORY_HELP_TEXT, MOVE_DIRECTORY_HREF),
Expand Down
9 changes: 8 additions & 1 deletion pipeline/src/org/labkey/pipeline/api/PipelineManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,15 @@ public static void validateTriggerConfiguration(TriggerConfiguration config, Con
String pipelineId = config.getPipelineId();
boolean isEnabled = config.isEnabled();

// validate that the file regular expression is not blank
if (StringUtils.isBlank(config.getFilePattern()))
{
errors.rejectValue("FilePattern", null, "File Pattern cannot be blank.");
return;
}

// validate that the config name is unique for this container
if (StringUtils.isNotEmpty(name))
if (StringUtils.isNotBlank(name))
{
if (name.length() > 255)
errors.rejectValue("Name", null, "Name must be less than 256 characters");
Expand Down