Partager via


Property.GetValidators Method

Gets the set of validators for this property.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Configuration.Design.ViewModel
Assembly:  Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime (in Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll)

Syntax

'Declaration
Public Overridable Function GetValidators As IEnumerable(Of Validator)
public virtual IEnumerable<Validator> GetValidators()
public:
virtual IEnumerable<Validator^>^ GetValidators()
public function GetValidators() : IEnumerable<Validator>

Return Value

An IEnumerable<T> containing default property validators, obtained from GetDefaultPropertyValidators() and additional validators provided through ValidationAttribute.

Remarks

Validators may be added by deriving from this and returning additional Validator objects. Or, they can be added by providing ValidationAttribute attributes to the underlying Component or during the construction of Property.
Validators specified by ValidationAttribute are created by the containing SectionViewModel.

See Also

Property Class

Microsoft.Practices.EnterpriseLibrary.Configuration.Design.ViewModel Namespace