related to VIVO-628, there was no validation on the datetimeinterval form when no years are specified

This commit is contained in:
tworrall 2013-12-09 16:18:02 -05:00
parent 1ee2f64f13
commit 4e216e9360
4 changed files with 12 additions and 6 deletions

View file

@ -63,8 +63,11 @@ public class DateTimeIntervalValidationVTwo implements N3ValidatorVTwo {
// errors.put(startFieldName, "If there is an end date, there should be a start date");
// return errors;
// }
// We need to ensure that the user has entered a start year or end year -- tlw72
if ( literalListIsNull(formStartYear) && literalListIsNull(formStartYear) ) {
errors.put(startFieldName, "Date/time intervals must begin with a year. Please enter a start year or an end year.");
return errors;
}
//Assuming form start year and form end year are working in conjunction with multiple values
int index;
if (!literalListIsNull(formStartYear) && !literalListIsNull(formEndYear)) {