if (!(context instanceof ProposedHolder)) {
// shouldn't happen, since both the above should hold a proposed
// value/argument
return null;
}
final ProposedHolder proposedHolder = (ProposedHolder) context;
final boolean required = isRequiredButNull(proposedHolder.getProposed());
if (required) {
final NamedFacet namedFacet = getFacetHolder().getFacet(NamedFacet.class);
final String name = namedFacet != null? namedFacet.value(): null;
return name != null? name + " is mandatory":"Mandatory";
} else {