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.Entry;
|
||||||
import de.bstly.board.model.EntryType;
|
import de.bstly.board.model.EntryType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class EntryValidator.
|
* The Class EntryValidator.
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class EntryValidator implements Validator {
|
public class EntryValidator implements Validator {
|
||||||
|
|
||||||
|
|
||||||
private UrlValidator urlValidator = new UrlValidator();
|
private UrlValidator urlValidator = new UrlValidator();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -44,7 +42,6 @@ public class EntryValidator implements Validator {
|
|||||||
if (entry.getEntryType() == null) {
|
if (entry.getEntryType() == null) {
|
||||||
errors.rejectValue("entrytype", "REQUIRED");
|
errors.rejectValue("entrytype", "REQUIRED");
|
||||||
} else if (EntryType.LINK.equals(entry.getEntryType())) {
|
} else if (EntryType.LINK.equals(entry.getEntryType())) {
|
||||||
entry.setText(null);
|
|
||||||
if (!StringUtils.hasText(entry.getUrl())) {
|
if (!StringUtils.hasText(entry.getUrl())) {
|
||||||
errors.rejectValue("url", "REQUIRED");
|
errors.rejectValue("url", "REQUIRED");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user