}
protected Object validateOnClient(Validator validator) throws ValidationException {
JSFunction clientSideFunction = new JSFunction("RichFaces.csv." + getJavaScriptFunctionName(), criteria.getValue(),
TEST_COMPONENT_ID, getJavaScriptOptions(), getErrorMessage(validator));
return qunit.runScript(clientSideFunction.toScript());
}
private Object getErrorMessage(Validator validator) {
FacesValidatorServiceImpl validatorService = new FacesValidatorServiceImpl();
FacesMessage message = validatorService.getMessage(facesEnvironment.getFacesContext(), validator, input, null);