Castle.Components.Validator
The base class for all the validation attributes that reference a property or feild.
The base class for all the validation attributes.
This class define a property that is used to retrieve the validtor that is used to
validate the value of the property.
Constructs an implementation.
Implementors should perform any initialization logic
The validation registry.
The target property
Builds this instance.
The validator runner.
The type that this validator is built for
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Implementors should perform any initialization logic
The validation registry.
The target property
Constructs and configures an
instance based on the properties set on the attribute instance.
Constructs and configures an
instance based on the properties set on the attribute instance.
Applies the common configuration defined on the attribute.
The validator instance.
Defines when to run the validation.
Defaults to RunWhen.Everytime
Gets or sets the validation execution order.
The execution order.
Gets or sets the a friendly name for the target property
The name.
Gets the error message.
The error message.
Gets the property accessor;
Initializes a new instance of the class.
Target property to compare
Initializes a new instance of the class.
Target property to compare
The error message.
Implementors should perform any initialization logic
The validation registry.
The target property
Constructs and configures an
instance based on the properties set on the attribute instance.
Gets the property to compare.
Gets the reference accessor.
Represents "phases" in which you can group
different validations and run then accordingly
Run all validations
Only during an insertion phase
Only during an update phase
Defines a custom phase
Validates that the collection is not empty
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Properties decorated with this attribute will be validated to ensure that they represent a valid
credit card number.
for more details.
Initializes a new credit card validator.
Initializes a new credit card validator.
Initializes a new credit card validator.
The card types to accept.
Initializes a new credit card validator.
The card types to accept.
The error message to be displayed if the validation fails.
Initializes a new credit card validator.
An array of card numbers to skip checking for (eg. gateway test numbers). Only digits should be provided for the exceptions.
Initializes a new credit card validator.
An array of card numbers to skip checking for (eg. gateway test numbers). Only digits should be provided for the exceptions.
The error message to be displayed if the validation fails.
Initializes a new credit card validator.
The card types to accept.
An array of card numbers to skip checking for (eg. gateway test numbers). Only digits should be provided for the exceptions.
Initializes a new credit card validator.
The card types to accept.
An array of card numbers to skip checking for (eg. gateway test numbers). Only digits should be provided for the exceptions.
The error message to be displayed if the validation fails.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this date is a valid one.
This checks the format of the date
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this date is a valid one.
This checks the format of the date
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this date is a valid one.
This checks the format of the date
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this date is a valid one.
This checks the format of the date
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this email address is a valid one.
This only check the format of the email, not if it really exists.
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that at least one of the properties in the group is not null or empty (for strings)
Initializes a new instance of the class.
The group.
Initializes a new instance of the class.
The group.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this date is a valid one.
This checks the format of the date
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate a field value is greater than another one.
Initializes a new instance of the class.
Target property to compare
Initializes a new instance of the class.
type
Target property to compare
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate a field value is greater than another one.
Initializes a new instance of the class.
Target property to compare
Initializes a new instance of the class.
type
Target property to compare
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this property has the required length (either exact or in a range)
Initializes a new exact length validator.
The exact length required.
Initializes a new exact length validator.
The exact length required.
The error message to be displayed if the validation fails.
Initializes a new range based length validator.
The minimum length, or int.MinValue if this should not be tested.
The maximum length, or int.MaxValue if this should not be tested.
Initializes a new range based length validator.
The minimum length, or int.MinValue if this should not be tested.
The maximum length, or int.MaxValue if this should not be tested.
The error message to be displayed if the validation fails.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that the property is not null or empty (for strings)
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validates that the content has a different
value from the property informed.
Initializes a new instance of the class.
The property to compare.
Initializes a new instance of the class.
The property to compare.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validates that the content has not been set to the specified value
Initializes a new instance of the class.
Initializes a new instance of the class.
Type of the value.
The must not be this value.
Initializes a new instance of the class.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this property has the required length (either exact or in a range)
Initializes an integer-based range validator.
The minimum value, or int.MinValue if this should not be tested.
The maximum value, or int.MaxValue if this should not be tested.
Initializes an integer-based range validator.
The minimum value, or int.MinValue if this should not be tested.
The maximum value, or int.MaxValue if this should not be tested.
The error message to be displayed if the validation fails.
Initializes an decimal-based range validator.
The minimum value, or decimal.MinValue if this should not be tested.
The maximum value, or decimal.MaxValue if this should not be tested.
Initializes an decimal-based range validator.
The minimum value, or decimal.MinValue if this should not be tested.
The maximum value, or decimal.MaxValue if this should not be tested.
The error message to be displayed if the validation fails.
Initializes a string-based range validator.
The minimum value, or String.Empty if this should not be tested.
The maximum value, or String.Empty if this should not be tested.
Initializes a string-based range validator.
The minimum value, or String.Empty if this should not be tested.
The maximum value, or String.Empty if this should not be tested.
The error message to be displayed if the validation fails.
Initializes a DateTime-based range validator.
The minimum value, or DateTime.MinValue if this should not be tested.
The maximum value, or DateTime.MaxValue if this should not be tested.
Initializes a DateTime-based range validator.
The minimum value, or DateTime.MinValue if this should not be tested.
The maximum value, or DateTime.MaxValue if this should not be tested.
The error message to be displayed if the validation fails.
Initializes a range validator of a specified type.
The data type to be used by the range validator.
The minimum value, or DateTime.MinValue if this should not be tested.
The maximum value, or DateTime.MaxValue if this should not be tested.
Initializes a range validator of a specified type.
The data type to be used by the range validator.
The minimum value, or DateTime.MinValue if this should not be tested.
The maximum value, or DateTime.MaxValue if this should not be tested.
The error message to be displayed if the validation fails.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that the property match the given regular expression
Initializes a new instance of the class.
The pattern.
Initializes a new instance of the class.
The pattern.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validates that the content has the same
value as the property informed.
Initializes a new instance of the class.
The property to compare.
Initializes a new instance of the class.
The property to compare.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Marker attribute for a method that is executed by the
Gets or sets when this validation is run.
The run when.
Gets or sets the execution order.
The execution order.
Validate that the field has a value in a set of values.
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message to be displayed if the validation fails.
Initializes a new instance of the class.
The set of values to compare against.
Initializes a new instance of the class.
The error message to be displayed if the validation fails.
The set of values to compare against.
Initializes a new instance of the class.
The of an enum class.
The enum names will be added to the contents of the set.
Initializes a new instance of the class.
The of an enum class.
The enum names will be added to the contents of the set.
The error message to be displayed if the validation fails.
Constructs and configures an
instance based on the properties set on the attribute instance.
Validate that this date is a valid one.
This checks the format of the date
Initializes a new instance of the class.
Initializes a new instance of the class.
The error message.
Constructs and configures an
instance based on the properties set on the attribute instance.
Base class for allowing custom validation of an instance beyond
the IValidator instances registered for
the object.
Provides hook for allowing custom validation of an instance beyond
the IValidator instances registered for
the object.
Determines whether the specified instance is valid. Returns an
that will be appended to the existing
error summary for an object.
The instance.
The run when.
Determines whether the specified instance is valid. Returns an
that will be appended to the existing
error summary for an object.
The instance.
The run when.
Allows for custom initialization based on type. This will only be called once
for each type passed to the contributor.
The type.
Determines whether the specified instance is valid. Returns an
that will be appended to the existing
error summary for an object.
The instance.
The when.
Allows for classes to define a custom attribute to validate themselves. Classes can decorate
methods like:
[ValidateSelf]
public void Validate(ErrorSummary errors) { ... }
to provide custom validate logic for the class. The method must take exactly one
ErrorSummary parameter.
Allows for custom initialization based on type. This will only be called once
for each type passed to the contributor.
The type.
Determines whether the specified instance is valid. Returns an
that will be appended to the existing
error summary for an object.
The instance.
The run when.
Gets the method info.
The method info.
Abstract implementation
Abstract implementation
Defines the basic contract for validators.
To create a new validation you should use 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
to indicate that it does support client-side validation and also implement the
to configure it.
Implementors should perform any initialization logic
The validation registry.
The target property
Implementors should perform the actual validation upon
the property value
true if the field is OK
Implementors should perform the actual validation upon
the property value
true if the field is OK
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
The target property
Defines when to run the validation.
Defaults to RunWhen.Everytime
Gets or sets the validation execution order.
The execution order.
The error message to be displayed if the validation fails
The error message.
Gets or sets the a friendly name for the target property
The name.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Gets the property name. The
is returned if non-null, otherwise it will return the property name.
Implemented by validators who want to delegate access to the property value.
Sets the property accessor.
Implementors should perform any initialization logic
The target property
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Implementors should perform the actual validation upon
the property value
The target type instance
true if the field is OK
Implementors should perform the actual validation upon
the property value
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Builds the error message.
Gets the string from resource
The key.
Gets or sets the validation execution order.
The execution order.
Defines when to run the validation.
Defaults to RunWhen.Everytime
The target property
The error message to be displayed if the validation fails
Gets or sets the a friendly name for the target property
The name.
Sets the property accessor.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Gets the property name. The
is returned if non-null, otherwise it will return the property name.
Implemented by validators who want to delegate comparison to a reference value.
Sets the property accessor.
Initializes a new instance of the AbstractCrossReferenceValidator class.
The property to compare.
Obtains the value of the reference on a specific instance.
The instance to inspect.
Target Property to compare
Sets the reference accessor.
Validates that the content is a collection that is not empty
Implementors should perform the actual validation upon
the property value
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
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.
Initializes a new credit card validator.
Initializes a new credit card validator.
The card types to accept.
Initializes a new credit card validator.
An array of card numbers to skip checking for (eg. gateway test numbers). Only digits should be provided for the exceptions.
Initializes a new credit card validator.
The card types to accept.
An array of card numbers to skip checking for (eg. gateway test numbers). Only digits should be provided for the exceptions.
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Validate that the propety value matches a valid (formatted) credit card
Note: null values are consider OK always.
true if the field is OK
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Gets the allowed credit card types.
The representing the allowed types.
An array of card numbers to skip checking for (eg. gateway test numbers).
A representing the card numbers to skip checking.
Returns the key used to internationalize error messages
Define the known card types
MasterCard Card
VISA Card
American Express Card
Diners Club Card
enRoute Card
Discover Card
JCB Card
Unkown card
All (known) cards
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid DateTime.
Null or empty value are allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Date (so no time part).
Null and Empty value are allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Check if only date given (so no time part)
The date to check
If Date only; otherwise, .
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Decimal.
Null or empty value are allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Double.
Null or empty value are allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Validate that this is a valid (formatted) email using regex
Validate a property using regular expression
Initializes a new instance of the class.
The expression.
Initializes a new instance of the class.
The expression.
The regular expression options.
Validate that the property value match the given regex. Null or empty values are allowed.
true if the field is OK
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets the regular expression object.
The regular expression object.
Gets the expression.
The expression.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
From http://www.codeproject.com/aspnet/Valid_Email_Addresses.asp
Initializes a new instance of the class.
Applies the browser validation.
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether [supports browser validation].
true if [supports browser validation]; otherwise, false.
Returns the key used to internationalize error messages
Ensures that at least one property in the group was filled with some value
Initializes a new instance of the class.
Name of the group.
Implementors should perform any initialization logic
The validation registry.
The target property
Implementors should perform the actual validation upon
the property value
true if the field is OK
Implementors should perform the actual validation upon
the property value
true if the field is OK
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The name.
The target property
Defines when to run the validation.
Defaults to RunWhen.Everytime
Gets or sets the validation execution order.
The execution order.
The error message to be displayed if the validation fails
The error message.
Gets or sets the a friendly name for the target property
The name.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Gets the property name. The
is returned if non-null, otherwise it will return the property name.
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Integer.
Null or empty value are allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Specifies the data type the
is dealing with.
Value compare as Integer
Value compare as Decimal
Value compare as Date
Value compare as DateTime
Comparing properties value and make sure it greater than one another.
Initializes a IsGreaterValidator of the given type and target property.
Validate that the property value greater than the value requirements.
true if the field value is greater than the target property
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets or sets the validation type for this validator.
Returns the key used to internationalize error messages
Browser validation support
Specifies the data type the
is dealing with.
Value compare as Integer
Value compare as Decimal
Value compare as Date
Value compare as DateTime
Comparing properties value and make sure it is lesser than one another.
Initializes a IsLesserValidator of the given type and target property.
The type of data to compare.
The name of the property to compare.
Validate that the property value greater than the value requirements.
true if the field value is greater than the target property
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets or sets the validation type for this validator.
Returns the key used to internationalize error messages
Browser validation support
Ensures that a property's string representation
is within the desired length limitations.
Initializes a new exact length validator.
The exact length required.
Initializes a new range based length validator.
The minimum length, or int.MinValue if this should not be tested.
The maximum length, or int.MaxValue if this should not be tested.
Validate that the property value matches the length requirements.
true if the field is OK
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Builds the error message.
Gets or sets the exact length to validate.
The exact length to validate.
Gets or sets the minimun length to validate.
The minimun length to validate.
Gets or sets the maximum length to validate.
The maximum length to validate.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Ensures that a property was
filled with some value
Check that this property has a value that is not null or empty (if string)
true if the field is OK
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Validates that the content has a different
value from the value of the property informed.
Initializes a new instance of the class.
The property to compare.
Validates that the fieldValue has a different
value from the value of the property set through the constructor.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Validates that the content is not set to the specified value
Initializes a new instance of the class.
Validates that the fieldValue
is not set to the specified value
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Builds the error message.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid DateTime.
Null or empty value allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Date (so no time part).
Null or empty value allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Check if only date given (so no time part)
The date to check
If Date only; otherwise, .
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Decimal.
Null or empty value allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Double.
Null or empty value allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Integer.
Null or empty value allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
Checks if the fieldValue can be converted to a valid Single.
Null or empty value allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Specifies the data type the
is dealing with.
is dealing with a range of integers
is dealing with a range of decimals
is dealing with a range of dates
is dealing with a range of strings
Ensures that a property's string representation
is within the desired value limitations.
Initializes an integer-based range validator.
The minimum value, or int.MinValue if this should not be tested.
The maximum value, or int.MaxValue if this should not be tested.
Initializes an decimal-based range validator.
The minimum value, or decimal.MinValue if this should not be tested.
The maximum value, or decimal.MaxValue if this should not be tested.
Initializes a DateTime-based range validator.
The minimum value, or DateTime.MinValue if this should not be tested.
The maximum value, or DateTime.MaxValue if this should not be tested.
Initializes a string-based range validator.
The minimum value, or String.Empty if this should not be tested.
The maximum value, or String.Empty if this should not be tested.
Initializes a range validator of the given type with the given minimum and maximum values.
The type of range validator.
The minimum value, or null if this should not be tested.
The maximum value, or null if this should not be tested.
Internal method that checks a given maximum value's data type and converts
null values to the proper maximum value for the data type.
The maximum value to be processed.
The maximum value with appropriate null-converted minimum values.
Validate that the property value matches the value requirements.
true if the field is OK
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Builds the error message.
Gets the error message string for Integer validation
an error message
Gets the error message string for Decimal validation
an error message
Gets the error message string for DateTime validation
an error message
Gets the error message string for string validation
an error message
Internal method that checks a given minimum value's data type and converts
null values to the proper minimum value for the data type.
The minimum value to be processed.
The minimum value with appropriate null-converted minimum values.
Gets or sets the range validation type for this validator. If the type is changed,
the minimum and maximum values are reset to null-equivalent values (i.e. appropriate
minimum and maximum values for the data type).
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Validates that the content has the same
value as the property informed.
Initializes a new instance of the class.
The property to compare.
Validates that the fieldValue
is the same as the property set through the constructor.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Ensures that a property's string representation
is within a given set of values.
Initializes a set-based validator with an empty set.
Initializes a set-based validator.
The set of values to validate against.
Initializes a set-based validator.
The of an enum class.
The enum names will be added to the contents of the set.
Validate that the property value matches the set requirements.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Builds the error message.
Gets or sets the set of values to validate against.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
This is a meta validator.
It is only useful to test a source content before setting it on the
target instance.
If the fieldValue is not null, an attempt to convert the
content to a Single is performed, and the field is considered value
if the conversion is successful. Null and empty are allowed.
The target type instance
The property/field value. It can be null.
true if the value is accepted (has passed the validation test)
Applies the browser validation by setting up one or
more input rules on .
The config.
Type of the input.
The generator.
The attributes.
The target.
Gets a value indicating whether this validator supports browser validation.
if browser validation is supported; otherwise, .
Returns the key used to internationalize error messages
Delegate to represent access to an instance.
The target instance.
The accessed value.
Utility for accessing parts of an instance.
Gets the accessor for the property.
The property.
The property accessor.
Gets the access to an an expression on a type.
The target type.
The path expression.
The expression accessor.
Obtains the value of a property on a specific instance.
The instance to inspect.
The property to inspect.
The property value.
Obtains the value of a property or field expression on a specific instance.
The instance to inspect.
The path of the field or property to inspect.
The path value.
Obtains the value of a property or field expression on a specific instance.
The instance to inspect.
The path of the field or property to inspect.
The path value.
Represents the base of a browser configuration.
Configures the JS library based on the supplied parameters.
The parameters.
Implementors should return any tag/js content
to be rendered after the form tag is rendered.
The form id.
Implementors should return any tag/js content
to be rendered after the form tag is closed.
The form id.
implementation that
caches the reflection and custom attributes calls for better performance.
Abstracts a validation registry per .
Gets all validators associated with a .
The validators returned are initialized.
The validator runner.
Target type.
Restrict the set returned to the phase specified
A Validator array
Gets all validators associated with a property.
The validators returned are initialized.
The validator runner.
Target type.
The property.
Restrict the set returned to the phase specified
A Validator array
Gets the property value accessor.
The property.
The property value accessor.
Gets the expression value accessor.
The target type.
The expression path.
The expression accessor.
Gets the string from resource by key
The key.
Initializes the class.
Initializes a new instance of the class.
Initializes a new instance of the class.
The resource manager.
Gets all validators associated with a .
The validators returned are initialized.
The validator runner.
Target type.
Restrict the set returned to the phase specified
A Validator array
Gets all validators associated with a property.
The validators returned are initialized.
The validator runner.
Target type.
The property.
Restrict the set returned to the phase specified
A Validator array
Gets the property value accessor.
The property.
The property value accessor.
Gets the expression value accessor.
The target type.
The expression path.
The expression accessor.
Gets the string from resource by key
The key.
Resolve properties that will be inspected for registered validators
the type to examinate properties for
resolved properties
Represents a validation report for an object instance
which is a snapshot since the last validation check.
Gets the errors for a property.
The property name.
Array of error messages
Registers the error message per .
The property.
The message.
Registers the error message per .
The property.
The message.
Registers the errors from another error summary instance.
The error summary.
Indicates whether some error was registered on this summary instance.
true if this instance has any error registered; otherwise, false.
Gets the total of validation errors since the last validation check.
That includes all errors for all properties.
The error count.
Gets the total of properties that have failed validation checks.
Gets the invalid properties' name.
The invalid properties.
Gets the error messages.
The error messages.
Abstracts a JS validation library implementation.
Each implementation should map the calls to their
own approach to enforce validation.
Set that a field should only accept digits.
The target name (ie, a hint about the controller being validated)
The violation message.
Set that a field should only accept numbers.
The target name (ie, a hint about the controller being validated)
The violation message.
Sets that a field is required.
The target name (ie, a hint about the controller being validated)
The violation message.
Sets that a field value must match the specified regular expression.
The target name (ie, a hint about the controller being validated)
The reg exp.
The violation message.
Sets that a field value must be a valid email address.
The target name (ie, a hint about the controller being validated)
The violation message.
Sets that field must have an exact lenght.
The target name (ie, a hint about the controller being validated)
The length.
Sets that field must have an exact lenght.
The target name (ie, a hint about the controller being validated)
The length.
The violation message.
Sets that field must have an minimum lenght.
The target name (ie, a hint about the controller being validated)
The minimum length.
Sets that field must have an minimum lenght.
The target name (ie, a hint about the controller being validated)
The minimum length.
The violation message.
Sets that field must have an maximum lenght.
The target name (ie, a hint about the controller being validated)
The maximum length.
Sets that field must have an maximum lenght.
The target name (ie, a hint about the controller being validated)
The maximum length.
The violation message.
Sets that field must be between a length range.
The target name (ie, a hint about the controller being validated)
The minimum length.
The maximum length.
Sets that field must be between a length range.
The target name (ie, a hint about the controller being validated)
The minimum length.
The maximum length.
The violation message.
Sets that field must be between a value range.
The target name (ie, a hint about the controller being validated)
Minimum value.
Maximum value.
The violation message.
Sets that field must be between a value range.
The target name (ie, a hint about the controller being validated)
Minimum value.
Maximum value.
The violation message.
Sets that field must be between a value range.
The target name (ie, a hint about the controller being validated)
Minimum value.
Maximum value.
The violation message.
Sets that field must be between a value range.
The target name (ie, a hint about the controller being validated)
Minimum value.
Maximum value.
The violation message.
Set that a field value must be the same as another field's value.
The target name (ie, a hint about the controller being validated)
The name of the field to compare with.
The violation message.
Set that a field value must _not_ be the same as another field's value.
The target name (ie, a hint about the controller being validated)
The name of the field to compare with.
The violation message.
Set that a field value must be a valid date.
The target name (ie, a hint about the controller being validated)
The violation message.
Sets that a field's value must be greater than another field's value.
Not implemented by the JQuery validate plugin. Done via a custom rule.
The target name (ie, a hint about the controller being validated)
The name of the field to compare with.
The type of data to compare.
The violation message.
Sets that a field's value must be lesser than another field's value.
Not implemented by the JQuery validate plugin. Done via a custom rule.
The target name (ie, a hint about the controller being validated)
The name of the field to compare with.
The type of data to compare.
The violation message.
Sets that a flied is part of a group validation.
Not implemented by the JQuery validate plugin. Done via a custom rule.
The target.
Name of the group.
The violation message.
Defines a html element type
Nothing specified
Text input element
Select element
Radio element
Checkbox element
Defines the entry point for validation.
Determines whether the specified instance is valid.
All validators are run.
The object instance to be validated (cannot be null).
if the specified obj is valid; otherwise, .
Determines whether the specified instance is valid.
All validators are run for the specified phase.
The object instance to be validated (cannot be null).
Restrict the set returned to the phase specified
if the specified instance is valid; otherwise, .
Checks whether an error summary exists for this instance.
The instance.
if and only if an error summary exists. See
for detailed conditions.
Gets the error list per instance.
The instance.
The error summary for the instance or if the instance
was either valid or has not been validated before.
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Collection must not be empty.
Looks up a localized string similar to Field value does not appear to be a valid credit card number, or is of an unsupported type..
Looks up a localized string similar to Please enter a valid date.
Looks up a localized string similar to Please enter a valid decimal in this field.
Looks up a localized string similar to Please enter a valid double in this field.
Looks up a localized string similar to Please enter a valid email address. For example fred@domain.com.
Looks up a localized string similar to Field must be {0} characters long.
Looks up a localized string similar to Field has an invalid content.
Looks up a localized string similar to This field value must be greater than the other field value..
Looks up a localized string similar to At least one of the values should not be empty.
Looks up a localized string similar to Please enter a valid integer in this field.
Looks up a localized string similar to This is a required field.
Looks up a localized string similar to Field must be between {0} and {1} characters long.
Looks up a localized string similar to Field must be less than {0} characters long.
Looks up a localized string similar to Field must be at least {0} characters long.
Looks up a localized string similar to This field value must be lesser than the other field value..
Looks up a localized string similar to Fields should not match.
Looks up a localized string similar to Field must not equals '{0}'.
Looks up a localized string similar to Field must be between {0} and {1}.
Looks up a localized string similar to Field must be less than or equal to {0}.
Looks up a localized string similar to Field must be between {0} and {1}.
Looks up a localized string similar to Field must be greater than or equal to {0}.
Looks up a localized string similar to Fields do not match.
Looks up a localized string similar to Field must be within a given set of values..
Looks up a localized string similar to Field value is invalid (not a valid single).
Looks up a localized string similar to Field value is invalid (not a valid time).
This exception is raised when a validation error occurs
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
The message.
The inner exception.
Initializes a new instance of the class.
The message.
The error messages.
Initializes a new instance of the class.
The message.
The inner exception.
The error messages.
Initializes a new instance of the class.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
The class name is null or is zero (0).
The info parameter is null.
When overridden in a derived class, sets the with information about the exception.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
The info parameter is a null reference (Nothing in Visual Basic).
Returns a list of current validation errors messages, if available.
Exception used when something goes wrong on
validation internal inner workings.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
The message.
The inner exception.
Initializes a new instance of the class.
The object that holds the serialized object data.
The contextual information about the source or destination.
Coordinates the gathering and execution of validators.
This class is not thread safe and should not be shared. It should only be
used in small scopes and discarded.
ValidatorRunner runner = new ValidatorRunner(new CachedValidationRegistry());
if (!runner.IsValid(customer))
{
// do something as the Customer instance is not valid
}
Initializes a new instance of the class.
The registry.
Initializes a new instance of the class.
The contributors.
The registry.
Initializes a new instance of the class.
If true, the runner will try to infer the validators based on data types
The registry.
The contributors.
Initializes a new instance of the class.
If true, the runner will try to infer the validators based on data types
The registry.
Determines whether the specified instance is valid.
All validators are run.
The object instance to be validated (cannot be null).
if the specified obj is valid; otherwise, .
Determines whether the specified instance is valid.
All validators are run for the specified phase.
The object instance to be validated (cannot be null).
Restrict the set returned to the phase specified
if the specified instance is valid; otherwise, .
Gets the registered validators.
Type of the parent.
The property.
Gets the registered validators.
Type of the parent.
The property.
The run when phase.
Gets the error list per instance.
The instance.
Gets the error list per instance.
The instance.
main validation logic happens here
object instance to be validated
the validators to run
The run when.
The summary to populate.
Executes the validation contributors.
The object instance.
The summary to populate.
The run when.
associate error summary to the object instance
object instance to associate validation error summary with
error summary to be associated with object instance
Sort given validators with default algorithm
Gets the extended properties, which allows
implementation to store additional information to track state.
The extended properties.
provide read access to validator registry
Default settings value being used for constructor or method overloads
Default setting is false: the validation runner will not infer validators based on data types