VerificationRule 列舉

定義

指定 VerificationAttribute 執行個體 (Instance) 所定義之條件運算式在驗證中的使用方式。

public enum class VerificationRule
public enum VerificationRule
type VerificationRule = 
Public Enum VerificationRule
繼承
VerificationRule

欄位

NotEmptyString 2

VerificationAttribute 執行個體中所指定之條件運算式的左側不能為空白字串 ("")。

Prohibited 1

禁止 VerificationAttribute 執行個體中所指定的條件運算式。

Required 0

需要 VerificationAttribute 執行個體中所指定的條件運算式。

備註

當您使用以擴充類別、成員或索引子時 VerificationAttribute ,您可以藉 ConditionalProperty ConditionalValue 由指定其中一個值,來定義由和屬性定義之條件運算式的使用方式 VerificationRule 。 如果指定了建立 [ VerificationAttribute 否] VerificationRule ,則會使用 [必要] 的預設值。

驗證規則之條件運算式的左邊是, ConditionalProperty 右邊是 ConditionalValueVerificationConditionalOperator會指定要如何與進行 ConditionalProperty 比較 ConditionalValue

適用於

另請參閱