mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Handling NULL form reference in case a form element is placed outside of a form element.
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Orchard.DynamicForms.Handlers {
|
||||
FieldName = element.Name
|
||||
};
|
||||
|
||||
if (element.Form.EnableClientValidation == true) {
|
||||
if (element.Form != null && element.Form.EnableClientValidation == true) {
|
||||
_formService.RegisterClientValidationAttributes(element, registrationContext);
|
||||
|
||||
if (registrationContext.ClientAttributes.Any()) {
|
||||
|
||||
Reference in New Issue
Block a user