The PresenceValidationRule type exposes the following members.

Constructors

  NameDescription
PresenceValidationRule

Methods

  NameDescription
Validate
Perform the validation logic associated with this rule.
(Overrides ValidationRule..::.Validate(ValidationContext).)

Properties

  NameDescription
AllowEmptyString
Gets or sets whether the empty string is treated as present. The default value is false, i.e. the empty string is treated as not present and will cause a validation failure.
DefaultMessage
Returns the default error message format string.
(Overrides ValidationRule..::.DefaultMessage.)
Message
Allows a custom error message format string to be specified. Use {0} as a placeholder for the name of the attribute being validated.
(Inherited from ValidationRule.)

See Also