@Override
protected void validate(Map<String, String> formSubmittedData)
throws FormValidationException {
String notes = formSubmittedData.get("Update Situation");
if (notes == null || notes.isEmpty()) {
throw new FormValidationException(
"Doctor, please include an update!");
}
try {
//because of multiple selection list in UI, the
//value of 'Serverity' can have a '_' at the beginning
Integer.parseInt(formSubmittedData.get("Severity").replaceAll("_", ""));
} catch (NumberFormatException nfe) {
throw new FormValidationException("Severity must be a number");
}
}