@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
FollowedArtifact followedArtifact = FollowedArtifactNotificationRulesPanel.this.getModelObject();
String regex = regexTextField.getModelObject();
ArtifactNotificationRuleType type = typeDropDown.getModelObject();
if (StringUtils.hasText(regex) && type != null) {
try {
if (artifactNotificationRuleService.isRuleValid(regex)) {
if (artifactNotificationRuleService.getByFollowedArtifactAndRegex(followedArtifact, regex) == null) {