Validation Class |
Field
Validator
ValidationOpts
Namespace: DataTables
public class Validation
The Validation type exposes the following members.
Name | Description | |
---|---|---|
Validation | Initializes a new instance of the Validation class |
Name | Description | |
---|---|---|
Basic |
Basic validation - this is used to perform the validation provided by the
validation options only. If the validation options pass (e.g. `required`,
`empty` and `optional`) then the validation will pass regardless of the
actual value.
| |
Boolean |
Validate an input as a boolean value.
| |
DateFormat |
Check that a valid date input is given
| |
DbValues |
Check that the given value is a value that is available in a database -
i.e. a join primary key. This will attempt to automatically use the table
name and value column from the field's `Options` method (under the
assumption that it will typically be used with a joined field), but the
table and field can also be specified via the options.
| |
Validate an input as an e-mail address.
| ||
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Ip |
Validate as an IP address.
| |
MaxLen |
Validate a string does not exceed a maximum length.
| |
MaxNum(Decimal, ValidationOpts) |
Check for a numeric input and that it is less than a given value.
| |
MaxNum(Decimal, String, ValidationOpts) |
Check for a numeric input and that it is less than a given value.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MinLen |
Validate a string has a minimum length.
| |
MinMaxLen |
Require a string with a certain minimum or maximum number of characters.
| |
MinMaxNum(Decimal, Decimal, ValidationOpts) |
Check for a numeric input and that it is both less than and greater than given values
| |
MinMaxNum(Decimal, Decimal, String, ValidationOpts) |
Check for a numeric input and that it is both less than and greater than given values
| |
MinNum(Decimal, ValidationOpts) |
Check for a numeric input and that it is greater than a given value.
| |
MinNum(Decimal, String, ValidationOpts) |
Check for a numeric input and that it is greater than a given value.
| |
None |
No validation - all inputs are valid.
| |
NoTags |
Ensure that the submitted string does not contain HTML tags
| |
NotEmpty |
Optional field, but if given there must be a non-empty value
| |
Numeric |
Check that any input is numeric.
| |
Required |
Required field - there must be a value and it must be a non-empty value
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Unique(ValidationOpts, String, String, Database) |
Check that the given value is unique in the database
| |
UniqueT(ValidationOpts, String, String, Database) |
Check that the given value is unique in the database
| |
Url |
Validate as an URL address.
| |
Values |
Confirm that the value submitted is in a list of allowable values
| |
Xss |
Check if string could contain an XSS attack string
|