fix link text
This commit is contained in:
parent
4a2b8b08bb
commit
d07805cd54
@ -12,14 +12,12 @@ import org.springframework.validation.Validator;
|
||||
import de.bstly.board.model.Entry;
|
||||
import de.bstly.board.model.EntryType;
|
||||
|
||||
|
||||
/**
|
||||
* The Class EntryValidator.
|
||||
*/
|
||||
@Component
|
||||
public class EntryValidator implements Validator {
|
||||
|
||||
|
||||
private UrlValidator urlValidator = new UrlValidator();
|
||||
|
||||
/*
|
||||
@ -44,7 +42,6 @@ public class EntryValidator implements Validator {
|
||||
if (entry.getEntryType() == null) {
|
||||
errors.rejectValue("entrytype", "REQUIRED");
|
||||
} else if (EntryType.LINK.equals(entry.getEntryType())) {
|
||||
entry.setText(null);
|
||||
if (!StringUtils.hasText(entry.getUrl())) {
|
||||
errors.rejectValue("url", "REQUIRED");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user