Updating Validation Message for URL Field

This change is made to now be in sync with the recent changes to how validation messages are being handled.
This commit is contained in:
Jamie Phillips
2015-10-20 20:34:23 -04:00
parent a01b7dde23
commit 14c2ee7944

View File

@@ -34,7 +34,9 @@ namespace Orchard.DynamicForms.ValidationRules
private LocalizedString GetValidationMessage(ValidationContext context)
{
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} is not a valid url.", context.FieldName)), context));
return String.IsNullOrWhiteSpace(ErrorMessage)
? T("{0} is not a valid URL.", context.FieldName)
: new LocalizedString(Tokenize(ErrorMessage, context));
}
}
}
}