[Missing namespace summary documentation for N:Castle.Components.Validator]

Syntax

C#
namespace Castle.Components.Validator

Classes

  ClassDescription
Public classAbstractValidationAttribute
The base class for all the validation attributes. This class define a Castle.Components.Validator property that is used to retrieve the validtor that is used to validate the value of the property.
Public classAbstractValidator
Abstract IValidator implementation
Public classBrowserValidationConfiguration
Represents the base of a browser configuration.
Public classCachedValidationRegistry
IValidatorRegistry implementation that caches the reflection and custom attributes calls for better performance.
Public classCollectionNotEmptyValidator
Validates that the content is a collection that is not empty
Public classCreditCardValidator
This validator validate that the is a valid credit card number in: Amex DinersClub Discover Discover enRoute JCB MasterCard VISA It is possible to specify more than a single card type. You can also specify exceptions for test cards.
Public classDateTimeValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classDateValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classDecimalValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classDoubleValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classEmailValidator
Validate that this is a valid (formatted) email using regex
Public classErrorSummary
Represents a validation report for an object instance which is a snapshot since the last validation check.
Public classGroupNotEmptyValidator
Ensures that at least one property in the group was filled with some value
Public classIntegerValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classLengthValidator
Ensures that a property's string representation is within the desired length limitations.
Public classNonEmptyValidator
Ensures that a property was filled with some value
Public classNotSameAsValidator
Validates that the content has a different value from the value of the property informed.
Public classNotSameValueValidator
Validates that the content is not set to the specified value
Public classNullableDateTimeValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classNullableDateValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classNullableDecimalValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classNullableDoubleValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classNullableIntegerValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classNullableSingleValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classRangeValidator
Ensures that a property's string representation is within the desired value limitations.
Public classRegularExpressionValidator
Validate a property using regular expression
Public classSameAsValidator
Validates that the content has the same value as the property informed.
Public classSetValidator
Ensures that a property's string representation is within a given set of values.
Public classSingleValidator
This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Public classValidateCollectionNotEmptyAttribute
Validates that the collection is not empty
Public classValidateCreditCardAttribute
Properties decorated with this attribute will be validated to ensure that they represent a valid credit card number. for more details.
Public classValidateDateAttribute
Validate that this date is a valid one.
Public classValidateDateTimeAttribute
Validate that this date is a valid one.
Public classValidateDecimalAttribute
Validate that this date is a valid one.
Public classValidateDoubleAttribute
Validate that this date is a valid one.
Public classValidateEmailAttribute
Validate that this email address is a valid one.
Public classValidateGroupNotEmptyAttribute
Validate that at least one of the properties in the group is not null or empty (for strings)
Public classValidateIntegerAttribute
Validate that this date is a valid one.
Public classValidateLengthAttribute
Validate that this property has the required length (either exact or in a range)
Public classValidateNonEmptyAttribute
Validate that the property is not null or empty (for strings)
Public classValidateNotSameAsAttribute
Validates that the content has a different value from the property informed.
Public classValidateNotSameValueAttribute
Validates that the content has not been set to the specified value
Public classValidateRangeAttribute
Validate that this property has the required length (either exact or in a range)
Public classValidateRegExpAttribute
Validate that the property match the given regular expression
Public classValidateSameAsAttribute
Validates that the content has the same value as the property informed.
Public classValidateSetAttribute
Validate that the field has a value in a set of values.
Public classValidateSingleAttribute
Validate that this date is a valid one.
Public classValidationException
This exception is raised when a validation error occurs
Public classValidationInternalError
Exception used when something goes wrong on validation internal inner workings.
Public classValidatorRunner
Coordinates the gathering and execution of validators. Castle.Components.Validator..::IValidatorRegistry

Interfaces

  InterfaceDescription
Public interfaceIBrowserValidationGenerator
Abstracts a JS validation library implementation. Each implementation should map the calls to their own approach to enforce validation.
Public interfaceIValidator
Defines the basic contract for validators.

To create a new validation you should use AbstractValidator as it implements most of the common methods and properties.

The validation should happen at IsValid, and if the validator can configure a client-side validation script, it should use the SupportsBrowserValidation to indicate that it does support client-side validation and also implement the ApplyBrowserValidation(BrowserValidationConfiguration, InputElementType, IBrowserValidationGenerator, IDictionary, String) to configure it.

Public interfaceIValidatorBuilder
Constructs an IValidator implementation.
Public interfaceIValidatorRegistry
Abstracts a validation registry per Type.

Enumerations

  EnumerationDescription
Public enumerationCreditCardValidator..::CardType
Define the known card types
Public enumerationInputElementType
Defines a html element type
Public enumerationRangeValidationType
Specifies the data type the RangeValidator is dealing with.
Public enumerationRunWhen
Represents "phases" in which you can group different validations and run then accordingly