Class XFormValidator
Validates XForm
Inheritance
System.Object
XFormValidator
Namespace: EPiServer.Web.Mvc.XForms
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class XFormValidator : ModelValidator
Constructors
XFormValidator(ModelMetadata, ControllerContext)
Creates an instance of XFormValidator with default parameters.
Declaration
public XFormValidator(ModelMetadata metadata, ControllerContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ModelMetadata | metadata | The metadata. |
System.Web.Mvc.ControllerContext | context | The controller context. |
XFormValidator(ModelMetadata, ControllerContext, LocalizationService)
Initializes a new instance of the XFormValidator class.
Declaration
public XFormValidator(ModelMetadata metadata, ControllerContext context, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ModelMetadata | metadata | The metadata. |
System.Web.Mvc.ControllerContext | context | The controller context. |
LocalizationService | localizationService | The resource locator that should be used by the current instance. |
Methods
Validate(Object)
Validates an XFormPost object
Declaration
public override IEnumerable<ModelValidationResult> Validate(object container)
Parameters
Type | Name | Description |
---|---|---|
System.Object | container | XFormPost object |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Web.Mvc.ModelValidationResult> | Validation errors |