mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user