CompareAttribute.GetClientValidationRules Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a list of compare-value client validation rules for the property using the specified model metadata and controller context.
public System.Collections.Generic.IEnumerable<System.Web.Mvc.ModelClientValidationRule> GetClientValidationRules (System.Web.Mvc.ModelMetadata metadata, System.Web.Mvc.ControllerContext context);
abstract member GetClientValidationRules : System.Web.Mvc.ModelMetadata * System.Web.Mvc.ControllerContext -> seq<System.Web.Mvc.ModelClientValidationRule>
override this.GetClientValidationRules : System.Web.Mvc.ModelMetadata * System.Web.Mvc.ControllerContext -> seq<System.Web.Mvc.ModelClientValidationRule>
Public Iterator Overridable NotOverridable Function GetClientValidationRules (metadata As ModelMetadata, context As ControllerContext) As IEnumerable(Of ModelClientValidationRule)
Parameters
- metadata
- ModelMetadata
The model metadata.
- context
- ControllerContext
The controller context.
Returns
A list of compare-value client validation rules.