--- samigo-app/src/java/org/sakaiproject/tool/assessment/jsf/validator/FinQuestionValidator.java (revision 26695) +++ samigo-app/src/java/org/sakaiproject/tool/assessment/jsf/validator/FinQuestionValidator.java (revision 26696) @@ -47,7 +47,9 @@ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { - + + try { + String text = (String) value; text = text.trim().replace(',','.'); // in Spain, comma is used as a decimal point @@ -94,7 +96,12 @@ i = text.indexOf("{", i+1); if (j+1 < text.length()) j = text.indexOf("}", j+1); else j = -1; + } + + } catch (StringIndexOutOfBoundsException e) { + // string index error + } }