mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 04:19:04 +08:00
fixes #5708 - change ui layer to display Mandatory checkbox as required
This commit is contained in:
@@ -45,9 +45,9 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
_IsRequired: shape.Checkbox(
|
||||
Id: "IsMandatory",
|
||||
Name: "IsMandatory",
|
||||
Title: "Mandatory",
|
||||
Title: "Required",
|
||||
Value: "true",
|
||||
Description: T("Tick this checkbox to make this check box element mandatory.")),
|
||||
Description: T("Tick this checkbox to make this check box element required.")),
|
||||
_CustomValidationMessage: shape.Textbox(
|
||||
Id: "CustomValidationMessage",
|
||||
Name: "CustomValidationMessage",
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("{0} is a mandatory field.", context.FieldName)
|
||||
? T("{0} is a required field.", context.FieldName)
|
||||
: T(ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user