Adding token support custom validation messages.

This commit is contained in:
Sipke Schoorstra
2014-10-30 13:59:00 -07:00
parent 17e42b8f0b
commit 509dbf6bf7
8 changed files with 25 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ namespace Orchard.DynamicForms.ValidationRules {
}
private LocalizedString GetValidationMessage(ValidationContext context) {
return T(ErrorMessage.WithDefault("{0} must match the value of {1}."), context.FieldName, TargetName);
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} must match the value of {1}.", context.FieldName, TargetName)), context));
}
}
}