public String toString(){
  return String.format("Validation error on field \"%s\": %s",fieldName,msg);
}

public String toString ( ) { return String . format ( "Validation error on field \"%s\": %s" , fieldName , msg ) ; }
returns a user - visible explanation of the validation error .
