validator.setMessageDetailNoMatch("\"{0}\" in \"{1}\" failed!! {4}");
//some very basic sanity test
try
{
validator.validate(facesContext, component, "9123456");
}
catch (ValidatorException ve)
{
String msg = ve.getFacesMessage().getDetail();
assertEquals(msg, "\"four\" in \"label\" failed!! [0-9]*");